Repository navigation
Code freeze workflow - #184246
Code freeze workflow#184246
Conversation
|
This is good - this test only runs if any of the matching folders have changed. It only outputs a negative value (fail), and "passing" is the absence of this check.... or a GitHub issue with Actions not being scheduled. I would approve this. An alternative to consider: always running this test and giving a pass/fail signal. Why? Because then we can add the test to the "required to merge" list, which means GitHub makes a stub check_run for this test and the MQ button / Autosubmit cannot bypass. The downside is its a bit more complex: # Copyright 2024 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
name: Material and Cupertino Code Freeze
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
branches:
- master
merge_group:
branches:
- master
permissions: read-all
jobs:
check_freeze:
name: Check Code Freeze
runs-on: ubuntu-latest
if: github.repository == 'flutter/flutter'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check for changes in frozen folders
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
frozen:
- 'packages/flutter/lib/src/material/**'
- 'packages/flutter/lib/src/cupertino/**'
- 'packages/flutter/test/material/**'
- 'packages/flutter/test/cupertino/**'
- 'examples/api/lib/material/**'
- 'examples/api/lib/cupertino/**'
- 'examples/api/test/material/**'
- 'examples/api/test/cupertino/**'
- 'packages/flutter/lib/fix_data/fix_cupertino.yaml'
- 'packages/flutter/lib/fix_data/fix_material/**'
- 'packages/flutter/test_fixes/material/**'
- 'packages/flutter/test_fixes/cupertino/**'
- name: Fail on frozen changes
# This step only runs if the 'frozen' filter matched
if: steps.filter.outputs.frozen == 'true'
run: |
echo "Error: Code changes detected during the current code freeze."
echo "The following paths are currently frozen:"
echo " - packages/flutter/lib/src/material/"
echo " - packages/flutter/lib/src/cupertino/"
echo " - (and associated tests/examples)"
echo ""
echo "If this is a critical fix that must land during the freeze, please file an issue for team-design."
echo "Information on this code freeze: https://github.com/flutter/flutter/issues/184093"
exit 1
- name: Pass if no frozen changes
if: steps.filter.outputs.frozen == 'false'
run: echo "No changes to frozen code." |
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
| echo "Information on this code freeze: https://github.com/flutter/flutter/issues/184093" | ||
| exit 1 | ||
|
|
||
| - name: Pass if overridden |
There was a problem hiding this comment.
Added clear override via label, similar to flutter/packages
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Check for changes in frozen folders | ||
| uses: dorny/paths-filter@v3 |
There was a problem hiding this comment.
Need to add this to the org.
|
Pinned and updated the issue with override instructions, and what qualifies to override it. |
flutter/flutter@a0924c7...05e0ae0 2026-04-08 [email protected] Fix Android engine flags defaulting to true for malformed values (flutter/flutter#184631) 2026-04-08 [email protected] Try one more again (flutter/flutter#184767) 2026-04-08 [email protected] Remove custom `analysis_options.yaml` from `imitation_game_flutter` (flutter/flutter#184717) 2026-04-08 [email protected] Add more error handling to unawaited callsites (flutter/flutter#184526) 2026-04-08 [email protected] Refactor: remove material from absorb_ponter_test, container_test, lookup_boundary_test, page_view_test, router_test, semantics_clipping_test, semantics_merge_test, shadow_test, text_test (flutter/flutter#183309) 2026-04-08 [email protected] Remove editable_text_utils cross-imports from material and cupertino … (flutter/flutter#184519) 2026-04-08 [email protected] Replace hard coded max path length with system defined one. (flutter/flutter#184697) 2026-04-08 [email protected] [Re-land] Add Support For Built-in Kotlin (flutter/flutter#184745) 2026-04-08 [email protected] Manually stop and continue LLDB breakpoints on Xcode 26.4+ (flutter/flutter#184690) 2026-04-08 [email protected] Code freeze workflow (flutter/flutter#184246) 2026-04-08 [email protected] [Dot shorthands] Migrate examples/api/lib/widgets (flutter/flutter#183965) 2026-04-08 [email protected] [cupertino.dart] Implement CupertinoMenuAnchor and CupertinoMenuItem using RawMenuAnchor (flutter/flutter#182036) 2026-04-08 [email protected] [Semantics] clarify Android header docs (flutter/flutter#183573) 2026-04-08 [email protected] [ci] mac build_test bringup false (flutter/flutter#184738) 2026-04-08 [email protected] Reland "Apply rect clipping to surface views" (flutter/flutter#184732) 2026-04-08 [email protected] Remove bringup label for resharded Windows tool_integration_tests shards (flutter/flutter#184721) 2026-04-08 [email protected] Tool: Add search and filtering to widget preview scaffold (flutter/flutter#184023) 2026-04-08 [email protected] Update localization from translation console (flutter/flutter#184742) 2026-04-07 [email protected] Revert "Add Support For Built-in Kotlin (#184227)" (flutter/flutter#184739) 2026-04-07 [email protected] Collect HCPP adoption analytics for flutter run/build apk/build appbundle (flutter/flutter#184225) 2026-04-07 [email protected] Add a github workflow for reverting PRs. (flutter/flutter#184593) 2026-04-07 [email protected] Add Support For Built-in Kotlin (flutter/flutter#184227) 2026-04-07 [email protected] Revert "Apply rect clipping to surface views (#184471)" (flutter/flutter#184728) 2026-04-07 [email protected] [Fix-forward] Added Compose plugin to Add-to-app Integration Test (flutter/flutter#184681) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR introduces a new GitHub Actions workflow to enforce a temporary code freeze on core Material and Cupertino directories. Implements flutter#184093 (instead of flutter/cocoon#4998) Any pull request attempting to modify files in the frozen paths will trigger a failing check, providing authors with clear instructions on how to proceed if they have a critical emergency fix. Frozen Paths Included (everything that will be moving over to flutter/packages): - Core Library - `packages/flutter/lib/src/material/` - `packages/flutter/lib/src/cupertino/` - Tests - `packages/flutter/test/material/` - `packages/flutter/test/cupertino/` - API Examples - `examples/api/lib/material/` - `examples/api/lib/cupertino/` - `examples/api/test/material/` - `examples/api/test/cupertino/` - Fix Data - `packages/flutter/lib/fix_data/fix_cupertino.yaml` - `packages/flutter/lib/fix_data/fix_material/` - `packages/flutter/test_fixes/material/` - `packages/flutter/test_fixes/cupertino/` Trigger Logic: - Target branch: master - Events: opened, reopened, synchronize, and ready_for_review - The workflow only executes if changes are detected within the specified directories. Override is possible with a label for emergencies, or necessary work we will land in service of decoupling during the freeze. #### 🛡️ Catching Existing PRs To ensure this freeze is applied to exiting pull requests, we can add this as a Required Status Check in a branch protection rule. <details><summary>How to enable Required Status Check</summary> 1. Go to the repository Settings on GitHub. 2. Select Branches from the left sidebar. 3. Find the branch protection rule for master and click Edit. 4. Enable "Require status checks to pass before merging". 5. Search for the new check name: "Check Code Freeze" and add it to the required list. 6. Click Save changes. </details> How this affects open PRs: Once the check is required: - Existing PRs opened before this workflow will be blocked from merging because the "Check Code Freeze" status will be missing or failed. - Authors of open PRs can trigger the check by: - Pushing a new commit (even a trivial one). - Closing and reopening the PR. - If the PR is a draft, marking it as "Ready for Review". - GitHub evaluates the entire diff of the PR. If an existing PR contains changes to packages/flutter/lib/src/material/, the workflow will trigger and fail the moment the PR is updated, regardless of when the original Material changes were pushed. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…r#11470) flutter/flutter@a0924c7...05e0ae0 2026-04-08 [email protected] Fix Android engine flags defaulting to true for malformed values (flutter/flutter#184631) 2026-04-08 [email protected] Try one more again (flutter/flutter#184767) 2026-04-08 [email protected] Remove custom `analysis_options.yaml` from `imitation_game_flutter` (flutter/flutter#184717) 2026-04-08 [email protected] Add more error handling to unawaited callsites (flutter/flutter#184526) 2026-04-08 [email protected] Refactor: remove material from absorb_ponter_test, container_test, lookup_boundary_test, page_view_test, router_test, semantics_clipping_test, semantics_merge_test, shadow_test, text_test (flutter/flutter#183309) 2026-04-08 [email protected] Remove editable_text_utils cross-imports from material and cupertino … (flutter/flutter#184519) 2026-04-08 [email protected] Replace hard coded max path length with system defined one. (flutter/flutter#184697) 2026-04-08 [email protected] [Re-land] Add Support For Built-in Kotlin (flutter/flutter#184745) 2026-04-08 [email protected] Manually stop and continue LLDB breakpoints on Xcode 26.4+ (flutter/flutter#184690) 2026-04-08 [email protected] Code freeze workflow (flutter/flutter#184246) 2026-04-08 [email protected] [Dot shorthands] Migrate examples/api/lib/widgets (flutter/flutter#183965) 2026-04-08 [email protected] [cupertino.dart] Implement CupertinoMenuAnchor and CupertinoMenuItem using RawMenuAnchor (flutter/flutter#182036) 2026-04-08 [email protected] [Semantics] clarify Android header docs (flutter/flutter#183573) 2026-04-08 [email protected] [ci] mac build_test bringup false (flutter/flutter#184738) 2026-04-08 [email protected] Reland "Apply rect clipping to surface views" (flutter/flutter#184732) 2026-04-08 [email protected] Remove bringup label for resharded Windows tool_integration_tests shards (flutter/flutter#184721) 2026-04-08 [email protected] Tool: Add search and filtering to widget preview scaffold (flutter/flutter#184023) 2026-04-08 [email protected] Update localization from translation console (flutter/flutter#184742) 2026-04-07 [email protected] Revert "Add Support For Built-in Kotlin (#184227)" (flutter/flutter#184739) 2026-04-07 [email protected] Collect HCPP adoption analytics for flutter run/build apk/build appbundle (flutter/flutter#184225) 2026-04-07 [email protected] Add a github workflow for reverting PRs. (flutter/flutter#184593) 2026-04-07 [email protected] Add Support For Built-in Kotlin (flutter/flutter#184227) 2026-04-07 [email protected] Revert "Apply rect clipping to surface views (#184471)" (flutter/flutter#184728) 2026-04-07 [email protected] [Fix-forward] Added Compose plugin to Add-to-app Integration Test (flutter/flutter#184681) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR introduces a new GitHub Actions workflow to enforce a temporary code freeze on core Material and Cupertino directories.
Implements #184093
(instead of flutter/cocoon#4998)
Any pull request attempting to modify files in the frozen paths will trigger a failing check, providing authors with clear instructions on how to proceed if they have a critical emergency fix.
Frozen Paths Included (everything that will be moving over to flutter/packages):
packages/flutter/lib/src/material/packages/flutter/lib/src/cupertino/packages/flutter/test/material/packages/flutter/test/cupertino/examples/api/lib/material/examples/api/lib/cupertino/examples/api/test/material/examples/api/test/cupertino/packages/flutter/lib/fix_data/fix_cupertino.yamlpackages/flutter/lib/fix_data/fix_material/packages/flutter/test_fixes/material/packages/flutter/test_fixes/cupertino/Trigger Logic:
the specified directories.
Override is possible with a label for emergencies, or necessary work we will land in service of decoupling during the freeze.
🛡️ Catching Existing PRs
To ensure this freeze is applied to exiting pull requests, we can add this as a Required Status Check in a branch protection rule.
How to enable Required Status Check
1. Go to the repository Settings on GitHub. 2. Select Branches from the left sidebar. 3. Find the branch protection rule for master and click Edit. 4. Enable "Require status checks to pass before merging". 5. Search for the new check name: "Check Code Freeze" and add it to the required list. 6. Click Save changes.How this affects open PRs:
Once the check is required:
changes to packages/flutter/lib/src/material/, the workflow will trigger and fail the
moment the PR is updated, regardless of when the original Material changes were pushed.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.