8000 feat(featureflags): refactor feature flag configs + add pause_scheduling_enabled flag by andrzejfudro · Pull Request #850 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content

feat(featureflags): refactor feature flag configs + add pause_scheduling_enabled flag - #850

Merged
andrzejfudro merged 2 commits into
mainfrom
feat/pause-scheduling-feature-flag
Sep 14, 2026
Merged

andrzejfudro merged 2 commits into
mainfrom
feat/pause-scheduling-feature-flag

Conversation

@andrzejfudro
@andrzejfudro andrzejfudro commented Sep 11, 2026 •
Copy link
Copy Markdown
Collaborator

Reasoning:

Currently adding a feature flag that is used by multiple services requires changes in a lot of files (each service requires changes in its manifest, config etc). This PR proposes moving feature flags to dedicated config maps, separating feature flag loading to a shared package and loading this package in each service config.go. This limits the amount of changes required next time to single config map and one golang file. Some places were untouched and will still require changes in the future: helm, ctk, frontend scripts.

@gemini-code-assist gemini-code-assist Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new global feature flag, pause_scheduling_enabled, across multiple microservices (Actuator, ESS, Health Service, UI, and Reconciler). It adds a unified Go package for feature flags, updates configuration loaders, adapts the UI service and configuration generation scripts, and configures Helm charts and Cluster Toolkit blueprints to deploy the new flag. The review feedback highlights critical precedence issues in environment variable loading: in Go, an explicit false for the lowercase variable can be incorrectly overridden by an uppercase variable, which should be resolved using os.LookupEnv; similarly, in the Python development server, the fallback logic should be aligned with the production shell script to ensure consistent behavior.

Comment thread internal/featureflags/featureflags.go Resolved
Comment thread internal/featureflags/featureflags.go Resolved
Comment thread cmd/ui/server.py Resolved
@andrzejfudro
andrzejfudro force-pushed the feat/pause-scheduling-feature-flag branch from d8e503c to 11bf204 Compare September 11, 2026 13:00
Establish the global configuration toggle pause_scheduling_enabled (default false)
exposed via Cluster Toolkit blueprint and Helm values.

- Create dedicated feature-flags-config ConfigMap in Helm templates.
- Introduce internal/featureflags package to provide unified flag loading.
- Inject feature flags into Actuator, ESS, Health Service, UI, and Reconciler deployments.
- Expose pauseSchedulingEnabled in UI dev server, Nginx entrypoint, and Angular FeatureFlagService.
- Add unit tests for UI dev server and internal feature flags package.

TAG=agy
@andrzejfudro
andrzejfudro force-pushed the feat/pause-scheduling-feature-flag branch from 11bf204 to 9506300 Compare September 11, 2026 13:07
@andrzejfudro
andrzejfudro marked this pull request as ready for review September 11, 2026 13:09
@andrzejfudro andrzejfudro changed the title feat(featureflags): add pause_scheduling_enabled configuration toggle feat(featureflags): refactor feature flag configs + add pause_scheduling_enabled flag Sep 11, 2026
Comment thread cmd/ui/server.py Resolved
AntonTyb
AntonTyb previously approved these changes Sep 11, 2026
@AntonTyb AntonTyb left a comment
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

env var naming question

…AUSE_SCHEDULING_ENABLED

- Update feature-flags-config ConfigMap key to XMC_PAUSE_SCHEDULING_ENABLED.
- Update internal/featureflags PauseSchedulingFlagName to XMC_PAUSE_SCHEDULING_ENABLED.
- Update UI runtime config generation (generate_config.sh, server.py) and unit tests.

TAG=agy
CONV=839c31e5-dcac-4b74-a385-78e900c16630
@andrzejfudro
andrzejfudro added this pull request to the merge queue Sep 14, 2026
Merged via the queue into main with commit c151bc9 Sep 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0