Skip to content

test(amber): move state-mat e2e into amber-integration#5682

Open
Yicong-Huang wants to merge 5 commits into
apache:mainfrom
Yicong-Huang:test/state-mat-into-amber-integration
Open

test(amber): move state-mat e2e into amber-integration#5682
Yicong-Huang wants to merge 5 commits into
apache:mainfrom
Yicong-Huang:test/state-mat-into-amber-integration

Conversation

@Yicong-Huang

@Yicong-Huang Yicong-Huang commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Drops the macOS-only pyamber-state-materialization-mac diagnostic job and the sqlite-backed SqlCatalog override it relied on. The two state-materialization e2e tests now run under the existing amber-integration ubuntu job, which already provisions postgres + iceberg catalog DB + MinIO + Lakekeeper and runs pytest -m integration as its last step.

Concretely:

Before After
pyamber-state-materialization-mac macOS job (build.yml:742) deleted
SqlCatalog (sqlite) injected in module fixture real postgres-backed JdbcCatalog, matching test_iceberg_document.py:45
Test discovered by an explicit pytest -sv <path> from that job @pytest.mark.integration + picked up by amber-integration's pytest -m integration

StorageConfig.initialize is wrapped in a session-autouse fixture (rather than called at module import time) so it co-exists with test_iceberg_document.py's import-time initialize regardless of pytest collection order.

The unit-style test_process_start_channel_persists_produce_state_on_start_output that the mac job also ran is untouched: it monkeypatches the output manager and is already picked up by the regular pyamber job's pytest -m "not integration" step.

Any related issues, documentation, discussions?

Closes #5681.

How was this PR tested?

Locally against the existing texera-dev infra (postgres on 5432 with texera_iceberg_catalog schema initialized via sql/iceberg_postgres_catalog.sql):

cd amber && pytest -m integration --junit-xml=/tmp/junit-integration.xml -sv
# 3 passed, 502 deselected  -- test_state_written_by_output_manager_is_replayed_by_reader,
#                              test_state_table_persists_across_writer_close,
#                              test_rest_catalog_round_trip

And the regular pyamber suite still green:

cd amber && pytest -m "not integration" -q
# 502 passed, 3 deselected

In CI, the amber-integration job picks these tests up automatically because they're marked @pytest.mark.integration. The mac job is gone so PRs no longer pay for a separate macOS runner just for these two tests.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 4.7)

@github-actions github-actions Bot added pyamber ci changes related to CI labels Jun 13, 2026
@codecov-commenter

codecov-commenter commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.74%. Comparing base (99b9ca2) to head (65f71c3).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5682      +/-   ##
============================================
- Coverage     53.09%   52.74%   -0.35%     
+ Complexity     2546     2543       -3     
============================================
  Files          1076     1090      +14     
  Lines         41762    42150     +388     
  Branches       4513     4529      +16     
============================================
+ Hits          22174    22233      +59     
- Misses        18278    18592     +314     
- Partials       1310     1325      +15     
Flag Coverage Δ *Carryforward flag
access-control-service 71.42% <ø> (ø)
agent-service 34.36% <ø> (ø)
amber 52.67% <ø> (-1.28%) ⬇️ Carriedforward from 55f0fca
computing-unit-managing-service 1.65% <ø> (ø)
config-service 56.71% <ø> (ø)
file-service 57.06% <ø> (ø)
frontend 47.86% <ø> (+0.34%) ⬆️ Carriedforward from 55f0fca
pyamber 89.76% <ø> (-0.97%) ⬇️
python 90.74% <ø> (ø) Carriedforward from 55f0fca
workflow-compiling-service 58.69% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

✅ No material benchmark regressions detected

🟢 13 better · 🔴 0 worse · ⚪ 2 noise (<±5%) · 0 without baseline

CI benchmark results are noisy; treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🟢 bs=10 sw=10 sl=64 451 0.275 22,208/29,682/29,682 us 🟢 -15.0% / 🟢 -15.6%
🟢 bs=100 sw=10 sl=64 947 0.578 106,608/137,775/137,775 us 🟢 +13.6% / 🟢 +5.8%
🟢 bs=1000 sw=10 sl=64 1,124 0.686 889,964/953,406/953,406 us 🟢 +17.9% / 🟢 -8.2%
Baseline details

Latest main a044287 from 2026-06-13T22:20:02.070Z

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 451 tuples/sec 395.36 tuples/sec 410.7 tuples/sec +14.1% +9.8%
bs=10 sw=10 sl=64 MB/s 0.275 MB/s 0.241 MB/s 0.251 MB/s +14.0% +9.7%
bs=10 sw=10 sl=64 p50 22,208 us 24,519 us 23,798 us -9.4% -6.7%
bs=10 sw=10 sl=64 p95 29,682 us 34,935 us 35,169 us -15.0% -15.6%
bs=10 sw=10 sl=64 p99 29,682 us 34,935 us 35,169 us -15.0% -15.6%
bs=100 sw=10 sl=64 throughput 947 tuples/sec 833.83 tuples/sec 894.84 tuples/sec +13.6% +5.8%
bs=100 sw=10 sl=64 MB/s 0.578 MB/s 0.509 MB/s 0.546 MB/s +13.6% +5.8%
bs=100 sw=10 sl=64 p50 106,608 us 120,315 us 111,887 us -11.4% -4.7%
bs=100 sw=10 sl=64 p95 137,775 us 145,017 us 139,602 us -5.0% -1.3%
bs=100 sw=10 sl=64 p99 137,775 us 145,017 us 139,602 us -5.0% -1.3%
bs=1000 sw=10 sl=64 throughput 1,124 tuples/sec 953.24 tuples/sec 1,045 tuples/sec +17.9% +7.6%
bs=1000 sw=10 sl=64 MB/s 0.686 MB/s 0.582 MB/s 0.638 MB/s +17.9% +7.6%
bs=1000 sw=10 sl=64 p50 889,964 us 1,052,108 us 969,370 us -15.4% -8.2%
bs=1000 sw=10 sl=64 p95 953,406 us 1,094,010 us 1,019,271 us -12.9% -6.5%
bs=1000 sw=10 sl=64 p99 953,406 us 1,094,010 us 1,019,271 us -12.9% -6.5%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,443.54,200,128000,451,0.275,22207.79,29681.99,29681.99
1,100,10,64,20,2112.87,2000,1280000,947,0.578,106607.71,137774.55,137774.55
2,1000,10,64,20,17798.41,20000,12800000,1124,0.686,889964.31,953406.43,953406.43

@Yicong-Huang Yicong-Huang force-pushed the test/state-mat-into-amber-integration branch 3 times, most recently from b9a13f2 to 9f13e26 Compare June 13, 2026 17:59
Drop the macOS-only `pyamber-state-materialization-mac` diagnostic job
and the sqlite-backed `SqlCatalog` override it relied on. Mark the
two e2e tests with @pytest.mark.integration so they run in the
`amber-integration` ubuntu job, which already provisions postgres +
iceberg catalog DB + MinIO + Lakekeeper and runs `pytest -m integration`
as its last step.

Catalog initialization now mirrors test_iceberg_document.py:45 —
postgres-backed JdbcCatalog with a tempdir warehouse — so we exercise
the real prod catalog code path instead of an sqlite shim. The
`StorageConfig.initialize` call is wrapped in a session-autouse
fixture (rather than at module import) so it co-exists with
test_iceberg_document.py's import-time initialize regardless of
pytest collection order.

The unit-style `test_process_start_channel_persists_produce_state_on_start_output`
that the mac job also ran is unaffected: it monkeypatches the output
manager and is already picked up by the regular `pyamber` job's
`pytest -m "not integration"` step.

Closes apache#5681
@Yicong-Huang Yicong-Huang force-pushed the test/state-mat-into-amber-integration branch from 9f13e26 to 009d9e4 Compare June 13, 2026 18:43
Yicong-Huang and others added 3 commits June 13, 2026 14:53
Signed-off-by: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com>
The macos-latest matrix entry was failing at "Set up job" / "docker:
command not found" because GitHub-hosted macOS runners have no
Docker and `services:` containers are Linux-only. Provision the same
stack natively on macOS:

  * postgres@16 via brew, with a `postgres` superuser created so the
    psql steps stay OS-agnostic;
  * minio via `brew install minio`, backgrounded with nohup;
  * lakekeeper from the upstream aarch64-apple-darwin tarball
    (published v0.11.0 onward — same version as the Linux docker tag);
  * minio-mc via brew for the warehouse bucket-init step;
  * protoc release asset switched on \$RUNNER_OS.

The job-level `services.postgres` block is also removed since it's a
Linux-only feature; both branches now start postgres via a step.

Each docker-dependent step branches on \$RUNNER_OS inside its `run:`
script so the YAML keeps one step per concept rather than
Linux/macOS pairs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
protoc 3.19.4 predates upstream arm64-mac builds — the previous
osx-aarch_64 URL 404'd. GitHub's Apple Silicon macOS runners ship
Rosetta 2 preinstalled, so the x86_64 binary runs transparently.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is correct. I will review it after the CI passes.

protoc's import resolver walks each -I in order. With `-I=/usr/local/include`
listed first, ambermessage.proto's `import "org/apache/.../controlcommands.proto"`
caused protoc to stat `/usr/local/include/org/apache/...`. On Linux that
path returns ENOENT and protoc falls through to the next -I; on macOS
the unzip-created /usr/local/include lacks +x for the runner user, so
the stat returns EACCES and protoc aborts.

Widen the existing chmod from `/usr/local/include/google` to
`/usr/local/include` so the parent dir is traversable on both OSes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI pyamber

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move state-materialization e2e tests into amber-integration (drop sqlite SqlCatalog and the macOS-only diagnostic job)

3 participants