Skip to content

Overhaul CICD label management for presubmits#5028

Merged
auto-submit[bot] merged 3 commits intoflutter:mainfrom
eyebrowsoffire:privileged_cicd
Apr 22, 2026
Merged

Overhaul CICD label management for presubmits#5028
auto-submit[bot] merged 3 commits intoflutter:mainfrom
eyebrowsoffire:privileged_cicd

Conversation

@eyebrowsoffire
Copy link
Copy Markdown
Contributor

This change overhauls the state management for the CICD label to ensure trusted users can run CI seamlessly and external contributors require explicit approval.

  • PR Opened: Privileged users (non-draft) auto-trigger CI and get the label. Non-privileged or draft PRs go to awaiting state.
  • Changes Pushed (Synchronize): Privileged users trigger CI if label is present. Non-privileged users have the label removed and go to awaiting state.
  • Edits: Removed automatic label adding on base branch changes.
  • Consolidated usage of _scheduleIfMergeable to ensure consistent conflict checking and label processing.
  • Added flowchart documentation in app_dart/docs/cicd_flowchart.md.

Once this is merged and deployed, we can remove the "remove CICD label" workflows from the other repos since that's all handled in cocoon now.

This change overhauls the state management for the `CICD` label to ensure trusted users can run CI seamlessly and external contributors require explicit approval.
- PR Opened: Privileged users (non-draft) auto-trigger CI and get the label. Non-privileged or draft PRs go to awaiting state.
- Changes Pushed (Synchronize): Privileged users trigger CI if label is present. Non-privileged users have the label removed and go to awaiting state.
- Edits: Removed automatic label adding on base branch changes.
- Consolidated usage of `_scheduleIfMergeable` to ensure consistent conflict checking and label processing.
- Added flowchart documentation in `app_dart/docs/cicd_flowchart.md`.
@eyebrowsoffire eyebrowsoffire requested a review from gmackall April 22, 2026 18:38
@eyebrowsoffire
Copy link
Copy Markdown
Contributor Author

Also, when looking a the cicd_flowchart.md file in GitHub, you can click the "show rich diff" button and you'll be able to actually see the fancy mermaid diagram rendered.

@eyebrowsoffire eyebrowsoffire added the CICD Run CI/CD label Apr 22, 2026
Copy link
Copy Markdown
Member

@gmackall gmackall left a comment

Choose a reason for hiding this comment

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

LGTM, though as I mentioned offline, I think the call to githubService.isTeamMember that _isPrivilegedUser depends upon is currently not working because (I believe, based on inspecting the logs I added in #5023) the token we are using doesn't have permission to read org membership. The autosubmit label is doing this successfully, so I think we just need to look at the permissions diff and iron that out

@eyebrowsoffire eyebrowsoffire added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App. and removed CICD Run CI/CD labels Apr 22, 2026
@auto-submit auto-submit Bot merged commit 7cbf0ea into flutter:main Apr 22, 2026
20 checks passed
@eyebrowsoffire eyebrowsoffire added the revert Label used to revert changes in a closed and merged pull request. label Apr 23, 2026
@auto-submit
Copy link
Copy Markdown
Contributor

auto-submit Bot commented Apr 23, 2026

A reason for requesting a revert of flutter/cocoon/5028 could
not be found or the reason was not properly formatted. Begin a comment with 'Reason for revert:' to tell the bot why
this issue is being reverted.

@auto-submit auto-submit Bot removed the revert Label used to revert changes in a closed and merged pull request. label Apr 23, 2026
auto-submit Bot pushed a commit that referenced this pull request Apr 23, 2026
This reverts commit 7cbf0ea.

This change caused issues where we were double-scheduling presubmits on roller bots, which caused failures. Rolling this back until we get this problem resolved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App. CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants