Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Configure Cirrus Branch Guard #2492

Merged
merged 1 commit into from
Feb 3, 2020
Merged

Configure Cirrus Branch Guard #2492

merged 1 commit into from
Feb 3, 2020

Conversation

amirh
Copy link
Contributor

@amirh amirh commented Feb 3, 2020

Description

This should add a presubmit that's block PR from landing while the tree is red.

Related Issues

flutter/flutter#28921

@amirh
Copy link
Contributor Author

amirh commented Feb 3, 2020

@fkorotkov

@fkorotkov
Copy link
Contributor

Actions picks configs from master and not the current branch. So once it's merged you'll the action in action. 😅

@amirh amirh merged commit bc69693 into flutter:master Feb 3, 2020
@amirh amirh deleted the branch-guard branch February 3, 2020 21:10
@amirh
Copy link
Contributor Author

amirh commented Feb 3, 2020

@fkorotkov I just submitted a new PR to test this, it seems like something isn't configured properly:

https://github.com/flutter/plugins/pull/2493/checks?check_run_id=424083286

 Run cirrus-actions/branch-guard@v1.21s
##[error]Node run failed with exit code 1
Run cirrus-actions/branch-guard@v1.2
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
Handling 'opened' action for pull_request event for refs/pull/2493/merge@685883f27477af9021590562a92b25cc6d630235.
Checking reference master for PR #2493 and SHA 3ee9504e572b2273210b65a0f47d2dc9f6a0cc5b.
Check suite 435935103: Cirrus CI in_progress null
Check suite 435935105: WIP queued null
Check suite 435949935: GitHub Actions completed skipped
Processing 1 check suites after filtering by 'appsToCheck'.
##[error]Resource not accessible by integration
##[error]Node run failed with exit code 1

@fkorotkov
Copy link
Contributor

Damn, it seems it's failing because the PR comes from a fork and the action is authorized with permissions of a fork which can't update status checks. Seems it's a limitation that can't be workarounded and we'll need to incorporate the logic in Cirrus or a separate GitHub App. For now it seems we can keep triggering the action on check_suite but then newly created PRs won't get an update until a new commit is merged to master.

@amirh
Copy link
Contributor Author

amirh commented Feb 3, 2020

Bummer.

Only updating when a commit is merged to master will deadlock the branch once it's red won't it?

Should I revert this PR for now?

@fkorotkov
Copy link
Contributor

Yeah, once a branch is red your'll need to merge though the red branch-guard check in order to fix it for all other PRs. Please revert or check #2495

amirh added a commit that referenced this pull request Feb 3, 2020
amirh added a commit that referenced this pull request Feb 3, 2020
sanekyy pushed a commit to sanekyy/plugins that referenced this pull request Feb 18, 2020
sanekyy pushed a commit to sanekyy/plugins that referenced this pull request Feb 18, 2020
EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants