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

Add Bors to merge pull requests #537

Merged
3 commits merged into from
Oct 14, 2022
Merged

Add Bors to merge pull requests #537

3 commits merged into from
Oct 14, 2022

Conversation

korthout
Copy link
Member

Description

This adds bors support to this repo.

  • runs the CI on a push to staging (typically what bors does when instructed to merge a pull request)
  • adds a special job that bors can await
  • configures bors only to fast-forward the target branch to the merge commit if this job succeeds

Related issues

closes #536

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

Bors needs a GH job that it can await and check the result of. Since
there is a matrix of testing related jobs in the build-test.yml
workflow, we need a final job that is only executed once all the other
test jobs have completed.

We also use this approach in the zeebe repo.
Bors requires a bit of configuration. This configuration is mostly
copied from the Zeebe repo.

The status list specifies the CI jobs that bors will await. This result
determines whether or not bors will actually fast-forward the target
branch. The entry "Test summary" is the name of a job added to the
build-test.yml workflow. A comment is placed in that job definition to
highlight that bors depends on it.

The other properties are pretty straightforward.
Bors will push merge commits to a branch called 'staging'. This push
should trigger the CI to run. Bors will then await the completion of
that run.
@korthout
Copy link
Member Author

Note that one final step is needed, which is to configure our bors instance for this repo. I've made a request to infra for this here.

@github-actions
Copy link

Test Results

  47 files    47 suites   1m 56s ⏱️
113 tests 113 ✔️ 0 💤 0
362 runs  362 ✔️ 0 💤 0

Results for commit b577b16.

@korthout
Copy link
Member Author

The new workflow looks like this now:
Screen Shot 2022-10-13 at 18 35 41

@korthout
Copy link
Member Author

bors try

ghost pushed a commit that referenced this pull request Oct 13, 2022
@ghost
Copy link

ghost commented Oct 13, 2022

try

Timed out.

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 @korthout 🐙 Let's see if it works

bors merge

@korthout
Copy link
Member Author

korthout commented Oct 14, 2022

It's happening 🙏

EDIT: I'm not sure whether the bors.toml needs to be merged already before this works, let's see

@ghost
Copy link

ghost commented Oct 14, 2022

Build succeeded:

@ghost ghost merged commit 9b89c2e into main Oct 14, 2022
@ghost ghost deleted the korthout-bors branch October 14, 2022 07:39
@remcowesterhoud
Copy link
Contributor

Apparently not 😄

@korthout
Copy link
Member Author

/backport

@github-actions
Copy link

Git push to origin failed for stable/8.0 with exitcode 1

@github-actions
Copy link

Successfully created backport PR #543 for stable/8.1.

ghost pushed a commit that referenced this pull request Oct 14, 2022
543: [Backport stable/8.1] Add Bors to merge pull requests r=korthout a=github-actions[bot]

# Description
Backport of #537 to `stable/8.1`.

relates to #536

Co-authored-by: Nico Korthout <nico.korthout@camunda.com>
ghost pushed a commit that referenced this pull request Oct 14, 2022
544: [Backport stable/8.0] Add Bors to merge pull requests r=remcowesterhoud a=korthout

# Description
Backport of #537 to `stable/8.0`.

relates to #536

Backported manually because there was a failure in the backport-action. Although the cherry-pick was without conflicts: `git cherry-pick -x 9810bb4 2ff389d b577b16`, I still needed to fix the CI. Specifically one of the jobs has a different name.

Co-authored-by: Nico Korthout <nico.korthout@camunda.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Bors to speed up merging
2 participants