Ma77Ball opened a new pull request, #5673:
URL: https://github.com/apache/texera/pull/5673
> Stacked on #5545 (adds the `/config/amber` endpoint and the `amber` config
source this PR namespaces). Base diff includes #5545 until it merges; review
the last commit only, or after #5545 lands. Kept as a draft for that reason.
### What changes were proposed in this PR?
- Changed `GuiConfigService` to store each endpoint's payload under its own
key in a `configBySource` map (`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 #5545).
- Derived the existing flat `env` getter from `configBySource` on read,
keeping its shape identical so the ~50 existing `guiConfigService.env.<flag>`
call sites are untouched.
- Added a `source(name)` accessor that returns one endpoint's payload in
isolation.
- Added unit tests for the isolation guarantees (each source retrievable
alone, no key bleed across sources, empty object for an unloaded source).
### Any related issues, documentation, discussions?
Closes: #5669
### How was this PR tested?
- Run `cd frontend && npx ng test
--include="src/app/common/service/gui-config.service.spec.ts"` and expect 11
passed (8 existing merge/orchestration tests plus 3 new source-isolation tests).
- Confirm the merged view is unchanged:
`service.env.defaultDataTransferBatchSize` still resolves after post-login
load, while `service.source("amber")` returns only the amber payload and
`service.source("gui")` does not contain `defaultDataTransferBatchSize`.
### Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]