Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a feature flag APPLY_ON_RESTART_FOR_APPLICATION_METADATA_CONFIG to control whether the applyOnRestart flag is set on ApplicationMetadataConfig. This is related to PR #35637 and aims to fix deferring config changes until container restart. The feature flag allows safe testing of the fix before full rollout.
Changes:
- Added a new boolean feature flag with default value
falseand expiration date of 2026-08-13 - Integrated the flag through the ModelContext.FeatureFlags interface and ModelContextImpl implementation
- Modified ContainerCluster to conditionally set applyOnRestart on ApplicationMetadataConfig based on the flag
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| flags/src/main/java/com/yahoo/vespa/flags/Flags.java | Defines the new feature flag APPLY_ON_RESTART_FOR_APPLICATION_METADATA_CONFIG |
| config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java | Adds the feature flag method to the FeatureFlags interface |
| configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java | Implements the feature flag in the FeatureFlags class with field declaration, initialization, and getter |
| config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java | Uses the feature flag to conditionally set applyOnRestart on ApplicationMetadataConfig; removes outdated comment from ComponentsConfig |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (applyOnRestartForApplicationMetadataConfigEnabled) { | ||
| builder.setApplyOnRestart(getDeferChangesUntilRestart()); | ||
| } | ||
|
|
There was a problem hiding this comment.
This line contains trailing whitespace. Consider removing it to maintain code cleanliness.
|
|
||
| public void prepare(DeployState deployState) { | ||
| applicationMetaData = deployState.getApplicationPackage().getMetaData(); | ||
| applyOnRestartForApplicationMetadataConfigEnabled = deployState.featureFlags().applyOnRestartForApplicationMetadataConfig(); |
There was a problem hiding this comment.
FYI you can read this from the constructor and make the field final
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.
Same as #35637 but this time with a feature flag for testing.
Intends to fix deferring applying config on restart.