refactor(frontend): preserve config source in GuiConfigService instead of one flat map#5673
Open
Ma77Ball wants to merge 20 commits into
Open
refactor(frontend): preserve config source in GuiConfigService instead of one flat map#5673Ma77Ball wants to merge 20 commits into
Ma77Ball wants to merge 20 commits into
Conversation
…all/texera into consolidate-batch-size-config-5544
GuiConfigService instead of one flat map
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5673 +/- ##
============================================
+ Coverage 52.91% 52.95% +0.03%
Complexity 2626 2626
============================================
Files 1090 1090
Lines 42188 42243 +55
Branches 4531 4533 +2
============================================
+ Hits 22324 22368 +44
- Misses 18555 18563 +8
- Partials 1309 1312 +3
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 433 | 0.264 | 22,946/28,301/28,301 us | 🔴 +12.3% / 🟢 -19.1% |
| ⚪ | bs=100 sw=10 sl=64 | 938 | 0.573 | 105,454/133,418/133,418 us | ⚪ within ±5% / 🟢 -6.1% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,128 | 0.688 | 894,484/947,677/947,677 us | ⚪ within ±5% / 🟢 +8.4% |
Baseline details
Latest main dfa0434 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 433 tuples/sec | 461 tuples/sec | 410.82 tuples/sec | -6.1% | +5.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.264 MB/s | 0.281 MB/s | 0.251 MB/s | -6.0% | +5.3% |
| bs=10 sw=10 sl=64 | p50 | 22,946 us | 20,430 us | 23,785 us | +12.3% | -3.5% |
| bs=10 sw=10 sl=64 | p95 | 28,301 us | 31,414 us | 34,980 us | -9.9% | -19.1% |
| bs=10 sw=10 sl=64 | p99 | 28,301 us | 31,414 us | 34,980 us | -9.9% | -19.1% |
| bs=100 sw=10 sl=64 | throughput | 938 tuples/sec | 954 tuples/sec | 891.94 tuples/sec | -1.7% | +5.2% |
| bs=100 sw=10 sl=64 | MB/s | 0.573 MB/s | 0.582 MB/s | 0.544 MB/s | -1.5% | +5.3% |
| bs=100 sw=10 sl=64 | p50 | 105,454 us | 104,196 us | 112,277 us | +1.2% | -6.1% |
| bs=100 sw=10 sl=64 | p95 | 133,418 us | 134,840 us | 139,802 us | -1.1% | -4.6% |
| bs=100 sw=10 sl=64 | p99 | 133,418 us | 134,840 us | 139,802 us | -1.1% | -4.6% |
| bs=1000 sw=10 sl=64 | throughput | 1,128 tuples/sec | 1,099 tuples/sec | 1,041 tuples/sec | +2.6% | +8.4% |
| bs=1000 sw=10 sl=64 | MB/s | 0.688 MB/s | 0.671 MB/s | 0.635 MB/s | +2.5% | +8.3% |
| bs=1000 sw=10 sl=64 | p50 | 894,484 us | 917,226 us | 972,714 us | -2.5% | -8.0% |
| bs=1000 sw=10 sl=64 | p95 | 947,677 us | 955,629 us | 1,023,057 us | -0.8% | -7.4% |
| bs=1000 sw=10 sl=64 | p99 | 947,677 us | 955,629 us | 1,023,057 us | -0.8% | -7.4% |
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,461.69,200,128000,433,0.264,22946.39,28301.25,28301.25
1,100,10,64,20,2131.91,2000,1280000,938,0.573,105453.55,133418.07,133418.07
2,1000,10,64,20,17730.65,20000,12800000,1128,0.688,894483.97,947677.09,947677.09a stable reference The env getter rebuilt a fresh object on every read, breaking the two-way [(ngModel)] binding for workflowEmailNotificationEnabled (menu.component.html) since writes landed on a discarded object. Memoize the merged view and invalidate it on source load. Add regression tests for reference stability and write-through.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
GuiConfigServiceto store each endpoint's payload under its own key in aconfigBySourcemap (preLogin,gui,amber,userSystem) instead of spreading them all into one flat object, so the origin of every config value is preserved (addresses the review comment on refactor(config): unify default-data-transfer-batch-size into one config key #5545).envgetter fromconfigBySourceon read, keeping its shape identical so the ~50 existingguiConfigService.env.<flag>call sites are untouched.envso it returns a stable object reference (rebuilt only when a source loads). This preserves the two-way[(ngModel)]write-through atmenu.component.html, which only persists when the same object identity is held across change-detection reads.source(name)accessor that returns one endpoint's payload in isolation.Any related issues, documentation, discussions?
Closes: #5669
How was this PR tested?
cd frontend && npx ng test --include="src/app/common/service/gui-config.service.spec.ts"and expect 15 passed (the 8 existing merge/orchestration tests plus 7 new tests covering source isolation, env reference stability, and merge precedence).service.env.defaultDataTransferBatchSizestill resolves after post-login load, whileservice.source("amber")returns only the amber payload andservice.source("gui")does not containdefaultDataTransferBatchSize.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF