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

Enable backport automation with mergify #143

Merged
merged 1 commit into from
Mar 23, 2021
Merged

Conversation

v1v
Copy link
Member

@v1v v1v commented Mar 18, 2021

What does this PR do?

Enable backports with mergify for:

  • 7.x branch with the label v7.13.0
  • 7.12 branch with the label v7.12.0

If any conflicts the PRs are created with the label conflict in addition a comment will be added with the actions to be done in order to fix the conflicts locally and push to the branch.

Why is it important?

Mergify provides different mechanism to interact with PRs and automate certain process.

Some examples

Backports to 7.x -> elastic/apm-pipeline-library#995
Merges to master -> elastic/apm-pipeline-library#994

Issues

Actions

  • Ask Infra to enable the mergify app in this project.
  • Agree with the team

actions:
comment:
message: |
This pull request is now in conflicts. Could you fix it @{{author}}? 🙏
Copy link
Member Author

Choose a reason for hiding this comment

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

author won't be resolved correctly -> Mergifyio/mergify#1096

Copy link
Member Author

Choose a reason for hiding this comment

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

- name: backport patches to 7.x branch
conditions:
- base=master
- label=v7.13.0
Copy link
Member Author

Choose a reason for hiding this comment

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

We will need some automation in the future to bump the version when required

Copy link
Contributor

Choose a reason for hiding this comment

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

Just so I am sure I understand how this works. If we set the v7.13.0 on the PR, it will be auto backported?

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly, but only when it gets merged.

To illustrate the above, please see the below example for one of the repositories where this service is configured:

  1. Avoid cache gsutils temporary location apm-pipeline-library#994 contains the label backport-to-7.x (that's what we are using in that particular repo), and was merged.
  2. A mergify action was triggered -> https://github.com/elastic/apm-pipeline-library/runs/1920298071
  3. Avoid cache gsutils temporary location (bp #994) apm-pipeline-library#995 was created afterwards

Copy link
Contributor

Choose a reason for hiding this comment

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

Great!

@v1v v1v added the automation label Mar 18, 2021
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 18, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Branch indexing

  • Start Time: 2021-03-22T22:28:15.011+0000

  • Duration: 4 min 28 sec

  • Commit: 6f5cd61

Test stats 🧪

Test Results
Failed 0
Passed 64
Skipped 0
Total 64

Trends 🧪

Image of Build Times

Image of Tests

actions:
comment:
message: |
This pull request is now in conflicts. Could you fix it @{{author}}? 🙏
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
This pull request is now in conflicts. Could you fix it @{{author}}? 🙏
This pull request is now in conflicts. Could you fix it? 🙏

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

I am good with this! I say lets merge it and start using it.

@ruflin
Copy link
Contributor

ruflin commented Mar 22, 2021

Looking forward to have this in!

@v1v
Copy link
Member Author

v1v commented Mar 23, 2021

I'll proceed with the merge now, mergify app has been enabled in this repo now, so we are good.

@v1v v1v merged commit 7ce0aec into elastic:master Mar 23, 2021
@v1v v1v deleted the feature/mergify branch March 23, 2021 09:18
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 autobackports with labels to fleet-server repository
4 participants