You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/08/27 11:46:12 UTC

[PR] test(pyamber): cover IcebergDocument uri, count and clear paths [texera]

aglinxinyuan opened a new pull request, #8048:
URL: https://github.com/apache/texera/pull/8048

   ### What changes were proposed in this PR?
   
   A new `TestIcebergDocumentWithMockCatalog` class in `test_iceberg_document.py`, taking the file from 9 collected items to 22.
   
   | Metric | Before | After |
   |---|---|---|
   | Codecov fully-covered lines **today** | 118/124 | **124/124** |
   | Codecov fully-covered lines **after #8040** | 115/124 | **124/124** |
   | Branch arms | 21/26 | **26/26** |
   
   **`iceberg_document.py` reaches 100% on both lines and branches.** +6 fully-covered lines today, +9 after #8040 — lines 90, 108 and 189 are `50% (1/2)` partials, invisible to the current branch-less report.
   
   The nine lines were exactly {79, 80, 81, 84, 90, 108, 109, 189, 190}: `get_uri`, `get_count`, `clear`, and the `get_after` skip guard.
   
   ### The measurement problem, and how it was handled
   
   The existing `TestIcebergDocument` needs a live postgres Iceberg catalog. CI supplies one; on this machine the `texera` role cannot read `iceberg_tables`, so **all 9 of those tests fail locally** and a raw local coverage run under-reports the file badly — enough to suggest ~50 winnable lines instead of 9.
   
   A throwaway sqlite-backed `SqlCatalog` proxy was used to reproduce the same code paths, applied identically to both sides and then deleted. The honest gap is 9.
   
   **The new tests need none of that.** They patch `IcebergCatalogInstance.get_instance` rather than mutating it, so they touch no process-global state and need no postgres, filesystem or network. They run in 1.25s.
   
   ### Two hazards found in the existing fixture
   
   - **`StorageConfig.initialize` is a process-wide one-shot** that raises on a second call, and `test_iceberg_document.py:45` calls it **unguarded at module level**. That works only because this module happens to be the first module-level initializer imported — two sibling modules guard with `if not StorageConfig._initialized`. A new test module initializing at module level and sorting before it would break collection for the whole suite. Appending a class to the existing file avoids this; a separate file would have been a trap.
   - **`IcebergCatalogInstance._catalogs` is a class-level dict** and `replace_instance` mutates it for the rest of the session, poisoning every later suite in the shared process. The new tests sidestep it by patching `get_instance`.
   
   ### Honest discounts
   
   - **`get_uri` and `get_count` have zero callers anywhere in `src/main/python`**, and `clear` has none either — the Scala side has its own implementation. These are real statements with real logic, not `@abstractmethod` stubs, but the value is interface-contract conformance rather than live behaviour.
   - **Lines 189–190 need a negative `from_index`.** `num_of_skipped_records` is provably 0 when the guard first runs, so the only route is `get_after(-1)`. It is drivable through the public API, but no production caller produces a negative offset — a defensive-guard test. Counted strictly, the bundle is 7 lines and 4 arms.
   - **One mutant survives this class**: `sum(f.file.record_count ...)` to `sum(1 ...)` at line 110, killed only by the pre-existing postgres-gated `test_get_counts`. Line 110 is already covered in CI so it is not a coverage gap, but the kill is not this bundle's and one was not manufactured.
   
   ### Verification
   
   Two reviewers returned seven findings; all repaired. **The repair pass added zero coverage lines and zero arms** — the builder's bundle already reached 124/124. Its entire value was mutation strength: 14 mutants that passed the delivered spec now fail. Stated plainly rather than sold as more coverage.
   
   Full pyamber suite: `5 failed, 1172 passed, 7 errors` against main's `1159 passed`. Failure sets sorted and diffed — **identical by identity**, 12 entries. `ruff check` and `ruff format --check` pass on CI's scope. The throwaway proxy is deleted and `git status --porcelain` is clean.
   
   No production file is touched; `git diff -- 'amber/src/main/*'` is empty.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8044
   
   ### How was this PR tested?
   
   ```
   cd amber && python -m pytest -m "not integration" -q src/test/python/core/storage/iceberg/test_iceberg_document.py -k MockCatalog
   ```
   
   ```
   13 passed, 1 warning in 1.25s
   ```
   
   The 9 pre-existing `TestIcebergDocument` tests still require the postgres catalog that CI provides.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(pyamber): cover IcebergDocument uri, count and clear paths [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8048:
URL: https://github.com/apache/texera/pull/8048#issuecomment-5439463901

   <!-- texera-benchmarks-comment -->
   ## ⚠️ Benchmark changes need a look
   
   🟢 0 better · 🔴 7 worse · ⚪ 8 noise (<±5%) · 0 without baseline
   
   > Compared against main `b01b11f` benchmarked on **this same runner**, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.
   
   [Dashboard](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/33068842343)
   
   | | config | throughput | MB/s | latency | max Δ latest / 7d |
   |---|---|---:|---:|---:|---:|
   | 🔴 | bs=10 sw=10 sl=64 | 375 | 0.229 | 26,359/32,908/32,908 us | 🔴 -13.9% / 🔴 +137.7% |
   | 🔴 | bs=100 sw=10 sl=64 | 786 | 0.48 | 124,913/152,175/152,175 us | 🔴 +13.8% / 🔴 +62.5% |
   | ⚪ | bs=1000 sw=10 sl=64 | 934 | 0.57 | 1,072,986/1,128,683/1,128,683 us | ⚪ within ±5% / 🔴 +25.0% |
   
   <details><summary>Baseline details</summary>
   
   Latest main `b01b11f` from same runner
   
   | config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
   |---|---|---:|---:|---:|---:|---:|
   | bs=10 sw=10 sl=64 | throughput | 375 tuples/sec | 435 tuples/sec | 894.86 tuples/sec | -13.8% | -58.1% |
   | bs=10 sw=10 sl=64 | MB/s | 0.229 MB/s | 0.266 MB/s | 0.546 MB/s | -13.9% | -58.1% |
   | bs=10 sw=10 sl=64 | p50 | 26,359 us | 23,251 us | 11,139 us | +13.4% | +136.6% |
   | bs=10 sw=10 sl=64 | p95 | 32,908 us | 30,410 us | 13,843 us | +8.2% | +137.7% |
   | bs=10 sw=10 sl=64 | p99 | 32,908 us | 30,410 us | 16,839 us | +8.2% | +95.4% |
   | bs=100 sw=10 sl=64 | throughput | 786 tuples/sec | 823 tuples/sec | 1,166 tuples/sec | -4.5% | -32.6% |
   | bs=100 sw=10 sl=64 | MB/s | 0.48 MB/s | 0.502 MB/s | 0.711 MB/s | -4.4% | -32.5% |
   | bs=100 sw=10 sl=64 | p50 | 124,913 us | 122,430 us | 87,509 us | +2.0% | +42.7% |
   | bs=100 sw=10 sl=64 | p95 | 152,175 us | 133,727 us | 93,675 us | +13.8% | +62.5% |
   | bs=100 sw=10 sl=64 | p99 | 152,175 us | 133,727 us | 102,153 us | +13.8% | +49.0% |
   | bs=1000 sw=10 sl=64 | throughput | 934 tuples/sec | 926 tuples/sec | 1,198 tuples/sec | +0.9% | -22.0% |
   | bs=1000 sw=10 sl=64 | MB/s | 0.57 MB/s | 0.565 MB/s | 0.731 MB/s | +0.9% | -22.1% |
   | bs=1000 sw=10 sl=64 | p50 | 1,072,986 us | 1,081,819 us | 859,766 us | -0.8% | +24.8% |
   | bs=1000 sw=10 sl=64 | p95 | 1,128,683 us | 1,182,283 us | 902,897 us | -4.5% | +25.0% |
   | bs=1000 sw=10 sl=64 | p99 | 1,128,683 us | 1,182,283 us | 937,957 us | -4.5% | +20.3% |
   
   </details>
   
   <details><summary>Raw CSV</summary>
   
   ```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,533.40,200,128000,375,0.229,26359.44,32907.69,32907.69
   1,100,10,64,20,2544.40,2000,1280000,786,0.480,124912.85,152174.84,152174.84
   2,1000,10,64,20,21418.58,20000,12800000,934,0.570,1072985.59,1128683.43,1128683.43
   ```
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(pyamber): cover IcebergDocument uri, count and clear paths [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #8048:
URL: https://github.com/apache/texera/pull/8048


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(pyamber): cover IcebergDocument uri, count and clear paths [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8048:
URL: https://github.com/apache/texera/pull/8048#issuecomment-5439220408

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8048?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 93.43%. Comparing base ([`b01b11f`](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a366a3b`](https://app.codecov.io/gh/apache/texera/commit/a366a3b257e3ab68c629a2f3c155072629d2a12d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :white_check_mark: All tests successful. No failed tests found.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #8048      +/-   ##
   ============================================
   + Coverage     93.41%   93.43%   +0.01%     
     Complexity     4696     4696              
   ============================================
     Files          1179     1179              
     Lines         47713    47713              
     Branches       5314     5314              
   ============================================
   + Hits          44573    44579       +6     
   + Misses         1698     1692       -6     
     Partials       1442     1442              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `99.32% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.60% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.67% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.73% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.70% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `95.89% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `79.31% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.91% <ø> (+0.13%)` | :arrow_up: | |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/8048/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (ø)` | | Carriedforward from [b01b11f](https://app.codecov.io/gh/apache/texera/commit/b01b11f8182313b9f3bff877c661f7ae0f0b5a1c?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/8048?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(pyamber): cover IcebergDocument uri, count and clear paths [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8048:
URL: https://github.com/apache/texera/pull/8048#issuecomment-5438883939

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@kunwp1`
     You can notify them by mentioning `@kunwp1` in a comment.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org