From 41b436d28e73e06c2c41df35f1474b5842fa6c07 Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Fri, 11 Aug 2023 17:57:00 -0700 Subject: [PATCH] ci: Remove Bors (#13715) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description This PR removes Bors in favor of native GitHub merge queues. A very similar cutover was tested and verified in https://github.com/pulumi/watchutil-rs/pull/39. # Deployment plan * [x] Find some time where PRs aren't being merged. This is mostly to minimize confusion while we're futzing with branch protections. * [x] Update the repo's branch protection rules to match https://github.com/pulumi/watchutil-rs/pull/38: * "Allow specified actors to bypass required pull requests": "bors" → Unchecked * "Status checks that are required": "bors" → "ci-ok" * "Require merge queue": Unchecked → Checked * "Only merge non-failing pull requests" → Unchecked * "Merge method" → Squash and merge * [ ] Merge this PR using the "Merge when ready" button. * [ ] If it merges successfully: confirm the prepare-release step ran and published pre-release artifacts. * [ ] If the merge fails: it's possible we'll need to tweak steps slightly (e.g. if the step's name doesn't match the branch protection rule). The end goal is a "ci-ok" step in both the PR and merge workflows that captures whether everything is green. * [ ] If the issues aren't immediately resolvable, revert the changes made to branch protection settings. Folks will continue to merge with Bors. If all goes well, we should be able to continue merging with MQ for a while -- at least long enough to cut a new CLI release. Once we're confident we won't need to roll back: * [ ] Delete branch protection rules for: * staging * testing * [ ] Remove pu/pu from https://app.bors.tech/repositories Fixes https://github.com/pulumi/pulumi/issues/13501 ## Checklist - [ ] I have run `make tidy` to update any new dependencies - [ ] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have run `make changelog` and committed the `changelog/pending/` documenting my change - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version --- .github/workflows/on-merge.yml | 15 --------------- .github/workflows/on-pr-target.yml | 1 + .github/workflows/on-pr.yml | 2 +- .github/workflows/release-pr.yml | 9 +++------ bors.toml | 11 ----------- 5 files changed, 5 insertions(+), 33 deletions(-) delete mode 100644 bors.toml diff --git a/.github/workflows/on-merge.yml b/.github/workflows/on-merge.yml index 59b708c80ade..6d5aeeb121f7 100644 --- a/.github/workflows/on-merge.yml +++ b/.github/workflows/on-merge.yml @@ -8,12 +8,6 @@ permissions: on: merge_group: - push: - branches: - - staging - - trying - tags-ignore: - - "*" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -49,7 +43,6 @@ jobs: prepare-release: name: prepare - if: github.ref_name == 'staging' || github.event_name == 'merge_group' # only on real merges needs: [info, ci] uses: ./.github/workflows/ci-prepare-release.yml permissions: @@ -63,14 +56,6 @@ jobs: project: ${{ github.repository }} secrets: inherit - bors-ok: - name: bors-ok - needs: [prepare-release] - runs-on: ubuntu-latest - steps: - - name: CI succeeded - run: exit 0 - ci-ok: name: ci-ok needs: [prepare-release] diff --git a/.github/workflows/on-pr-target.yml b/.github/workflows/on-pr-target.yml index 213da85699d3..f2602488f65f 100644 --- a/.github/workflows/on-pr-target.yml +++ b/.github/workflows/on-pr-target.yml @@ -23,4 +23,5 @@ jobs: ref: refs/pull/${{ github.event.pull_request.number }}/merge fetch-depth: 0 - name: Check for non-linear history + if: false run: ./scripts/git-linear-history-check.sh diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index 22658ba8845e..c452093e2b67 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -134,7 +134,7 @@ jobs: ci-ok: name: ci-ok - needs: [prepare-release] + needs: [ci] runs-on: ubuntu-latest steps: - name: CI succeeded diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index b9ba75ace2de..e2b559805827 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -75,11 +75,8 @@ jobs: git push origin "pkg/v${PULUMI_VERSION}" git push -u origin HEAD - PR_BODY="" + PR=$(gh pr create --title "Changelog and go.mod updates for v${PULUMI_VERSION}") + if [ "${QUEUE_MERGE}" = "true" ]; then - PR_BODY="bors merge" + gh pr merge --auto "${PR}" fi - - gh pr create \ - --title "Changelog and go.mod updates for v${PULUMI_VERSION}" \ - --body "${PR_BODY}" diff --git a/bors.toml b/bors.toml deleted file mode 100644 index 78747b3bf4ae..000000000000 --- a/bors.toml +++ /dev/null @@ -1,11 +0,0 @@ -delete_merged_branches = true -update_base_for_deletes = true - -timeout-sec = 7200 # two hours, in seconds - -status = [ - 'bors-ok', -] -pr_status = [ - 'linear-history', -]