Skip to content

Add applyOnRestart on ApplicationMetadataConfig with feature flag#35914

Merged
bjorncs merged 3 commits intomasterfrom
glebashnik/add-apply-on-restart-to-application-metadata-config
Feb 13, 2026
Merged

Add applyOnRestart on ApplicationMetadataConfig with feature flag#35914
bjorncs merged 3 commits intomasterfrom
glebashnik/add-apply-on-restart-to-application-metadata-config

Conversation

@glebashnik
Copy link
Member

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.

@glebashnik glebashnik requested a review from Copilot February 13, 2026 14:32
@glebashnik glebashnik changed the title Add feature flag for applyOnRestart on ApplicationMetadataConfig. Add applyOnRestart on ApplicationMetadataConfig with feature flag Feb 13, 2026
@glebashnik glebashnik requested a review from bjorncs February 13, 2026 14:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 false and 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());
}

Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

This line contains trailing whitespace. Consider removing it to maintain code cleanliness.

Suggested change

Copilot uses AI. Check for mistakes.

public void prepare(DeployState deployState) {
applicationMetaData = deployState.getApplicationPackage().getMetaData();
applyOnRestartForApplicationMetadataConfigEnabled = deployState.featureFlags().applyOnRestartForApplicationMetadataConfig();
Copy link
Member

Choose a reason for hiding this comment

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

FYI you can read this from the constructor and make the field final

@bjorncs bjorncs merged commit 6e88a95 into master Feb 13, 2026
2 of 3 checks passed
@bjorncs bjorncs deleted the glebashnik/add-apply-on-restart-to-application-metadata-config branch February 13, 2026 15:00
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