Refactor and split up DynamicConfig*, prepare for more flag groups.#4732
Merged
auto-submit[bot] merged 2 commits intoMay 29, 2025
Merged
Conversation
jtmcdole
requested changes
May 29, 2025
| const String kDefaultBranchName = 'master'; | ||
|
|
||
| interface class Config { | ||
| interface class Config extends DynamicallyUpdatedConfig { |
| return DynamicConfigUpdater().fetchDynamicConfig(); | ||
| } | ||
|
|
||
| /// Returns the latest copy of [DynamicConfig] fetched from the repository. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Doing as pre-work before requested changes on #4731.
I ran into a number of cases where changes were needed, and figured a separate PR was cleaner:
Moved all of the bits out of
config.dartand intoflags/_*.dartfiles to reduce file sizeWe have command-line tools in
app_dart/binthat are not a server (i.e.verify_test_ownership.dart) that createCiYamlobjects, and also needCiYamlFlags. Instead of hacking something together, I addedDynamicConfig.fromRemoteLatestandDynamicConfig.fromLocalRepoto use, respectively, in these command-line tools (which are used in CI production, not unused tools).I made all of the objects
const-able, and made it easy to create defaults, even if they are notconstthemselves, by using thefactoryconstructor pattern. That also gets rid of the kludge we had withcontentAwareHashingdefault values.