Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix auto merge with merge queues #1213

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Conversation

npepinpe
Copy link
Member

Description

Fixes the CI workflow, specifically enabling it for merge queues (fixing the triggers to run) and also updating the auto merge job to use the GitHub CLI to just add to the merge queue.

Related issues

related to camunda/team-infrastructure#633

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually

Documentation:

  • Javadoc has been written
  • The documentation is updated

workflow_call: { }

concurrency:
Copy link
Member Author

Choose a reason for hiding this comment

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

💭 Added this as a nice to have copied from the Zeebe CI. I can remove it of course, but it's generally useful to avoid having multiple runs for the same commit.

@@ -178,13 +192,15 @@ jobs:
- id: approve-and-merge-dependabot
name: Approve and merge dependabot PR
if: github.actor == 'dependabot[bot]' && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')
run: gh pr review ${{ github.event.pull_request.number }} --approve -b "bors merge"
run: gh pr merge --auto --merge "$PR_URL"
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

❌ This won't work:

This enables the pull request to be merged when any tests and approvals required by the branch protection rules are successfully met

You removed the approval, so when you enable auto-merge it will only start the merge once someone gives approval.

Copy link

github-actions bot commented Jul 24, 2024

Test Results

 50 files  ±0   50 suites  ±0   1m 33s ⏱️ +4s
138 tests ±0  138 ✅ ±0  0 💤 ±0  0 ❌ ±0 
438 runs  ±0  438 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 61a0a70. ± Comparison against base commit 20c160c.

♻️ This comment has been updated with latest results.

@npepinpe npepinpe requested a review from remcowesterhoud July 24, 2024 12:58
@npepinpe
Copy link
Member Author

Haven't tested the auto merge though, but I can keep an eye in the next few days for it. The merging itself looks like it will mostly work, though we can use this PR as a test (but at least the required check is green here, so it picked it up properly).

Copy link
Contributor

@remcowesterhoud remcowesterhoud left a comment

Choose a reason for hiding this comment

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

Thanks @npepinpe. I think there's a bug in the CI

@@ -178,13 +192,15 @@ jobs:
- id: approve-and-merge-dependabot
name: Approve and merge dependabot PR
if: github.actor == 'dependabot[bot]' && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')
run: gh pr review ${{ github.event.pull_request.number }} --approve -b "bors merge"
run: gh pr merge --auto --merge "$PR_URL"
Copy link
Contributor

Choose a reason for hiding this comment

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

❌ This won't work:

This enables the pull request to be merged when any tests and approvals required by the branch protection rules are successfully met

You removed the approval, so when you enable auto-merge it will only start the merge once someone gives approval.

@npepinpe
Copy link
Member Author

Oh, right, I assumed the auto flag would do that.

Copy link
Contributor

@remcowesterhoud remcowesterhoud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@remcowesterhoud remcowesterhoud added this pull request to the merge queue Jul 24, 2024
Merged via the queue into main with commit e527dce Jul 24, 2024
10 checks passed
@remcowesterhoud remcowesterhoud deleted the np-fix-automerge branch July 24, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants