WIP - Implement code freeze mechanism at autosubmit#4998
WIP - Implement code freeze mechanism at autosubmit#4998Piinks wants to merge 3 commits intoflutter:mainfrom
Conversation
| } | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Excellent place for JsonSerializable:
final yamlMap = loadYaml(yamlString) as YamlMap;
return YourJsonSerializable.fromJson(Map<String, dynamic>.from(yamlMap));
auto_submit/lib/service/config.dart
Outdated
| this, | ||
| cache, | ||
| ); | ||
| final codeFreezeFile = File( |
There was a problem hiding this comment.
This only happens at boot time - what do you think about using something like DynamicConfig?
code: https://github.com/flutter/cocoon/blob/main/app_dart/lib/src/service/flags/dynamic_config.dart
e.g. usage (the fetcher reads from github HEAD every 5 minutes, so no code push needed):
cocoon/app_dart/bin/gae_server.dart
Lines 48 to 50 in ccfc427
There's no file reading there either; we use build hooks to codify the config at compile time.
There was a problem hiding this comment.
Updated, is this more what you were thinking? :)
|
More to think about: how many PRs are merged with the merge button vs using autosubmit? A label that only blocks autosubmit will not prevent PRs from landing. I do like the frozen paths, but honestly - a workflow that fails if the path is modified would ensure you do not land anything since it will be "failing" for those paths. Autosubmit should respect that. |
Yeah, definitely room for folks to still sneak in, even though we don't want people to use the merge button. Do you mean we should maybe do both this and the presubmit check from the analyzer? |
This adds the ability to implement a code freeze in Flutter repositories based on PR labels or specific code paths.
In preparation for decoupling, we will be putting a code freeze in place for material and cupertino. This will not happen for a few weeks.
We discussed a few ways to do this:
Overview of the preferred approach here
auto_submit/lib/configuration/code_freeze.yaml. This file maps repository slugs to specific "frozen" labels and file paths.f: material design) or specific directories (e.g.,packages/flutter/lib/src/material/). Because it's repo-specific, a freeze on flutter/flutter will not affect flutter/packages unless explicitly configured.To modify the code freeze in the future, simply update the
auto_submit/lib/configuration/code_freeze.yamlfile.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.