Skip to content

Conversation

@3405691582
Copy link
Collaborator

New features and the code paths enabling them are often gated behind flags; initially, the defaults have these code paths disabled, i.e., the flags are off by default. That default value is statically defined in the flag's definition, and in order to change them to ramp up exposure to the new feature, we need to modify the flags before they are parsed.

Here, we do this as follows. We introduce a key-equals-value file, where the keys are the flag names and the values are the new default value for the flag. If the file exists, then it is read and the defaults changed according to the key-value pairs in the file; otherwise, the statically defined defaults are used.

This enables deployment of new features by deploying a new defaults file rather than by deploying the entire package, and lets new functionality be disabled by modifying or removing the defaults file, rather than rolling back the entire software package.

@3405691582 3405691582 force-pushed the config_1 branch 2 times, most recently from 1cd7f46 to 3e2884a Compare November 6, 2025 15:52
@3405691582 3405691582 requested a review from jemoreira November 6, 2025 15:53
@3405691582 3405691582 force-pushed the config_1 branch 2 times, most recently from f3e15c9 to fcef75c Compare November 12, 2025 18:46
@3405691582 3405691582 force-pushed the config_1 branch 2 times, most recently from 7a73755 to 034de33 Compare November 12, 2025 19:45
@Databean Databean added the kokoro:run Run e2e tests. label Nov 13, 2025
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Nov 13, 2025
New features and the code paths enabling them are often gated behind
flags; initially, the defaults have these code paths disabled, i.e., the
flags are off by default. That default value is statically defined in
the flag's definition, and in order to change them to ramp up exposure
to the new feature, we need to modify the flags before they are parsed.

Here, we do this as follows. We introduce a key-equals-value file, where
the keys are the flag names and the values are the new default value for
the flag. If the file exists, then it is read and the defaults changed
according to the key-value pairs in the file; otherwise, the statically
defined defaults are used.

This enables deployment of new features by deploying a new defaults file
rather than by deploying the entire package, and lets new functionality
be disabled by modifying or removing the defaults file, rather than
rolling back the entire software package.
@3405691582 3405691582 enabled auto-merge November 13, 2025 19:23
@3405691582 3405691582 added the kokoro:force-run Trigger a presubmit build unconditionally. label Nov 13, 2025
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:force-run Trigger a presubmit build unconditionally. label Nov 13, 2025
@3405691582 3405691582 added this pull request to the merge queue Nov 13, 2025
Merged via the queue into google:main with commit 795e159 Nov 13, 2025
22 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.

4 participants