Skip to content

New way of backporting #4887

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

Merged
merged 2 commits into from
Apr 22, 2025
Merged

New way of backporting #4887

merged 2 commits into from
Apr 22, 2025

Conversation

ev1yehor
Copy link
Contributor

Proposed commit message

New way of backporting to active branches using new github action.

Why

No need to support the hardcoded branches in the .mergify.yml file anymore.

We use a dynamic approach by fetching https://storage.googleapis.com/artifacts-api/snapshots/branches.json and filtering the branches.

Issues

Already enabled in Elastic Agent:

@ev1yehor ev1yehor added the enhancement New feature or request label Apr 22, 2025
@ev1yehor ev1yehor self-assigned this Apr 22, 2025
Copy link
Contributor

mergify bot commented Apr 22, 2025

This pull request does not have a backport label. Could you fix it @ev1yehor? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-/d./d is the label to automatically backport to the /d./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.
    NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Apr 22, 2025
@ev1yehor ev1yehor marked this pull request as ready for review April 22, 2025 14:49
@ev1yehor ev1yehor requested a review from a team as a code owner April 22, 2025 14:49
Copy link
Contributor

@karenzone karenzone left a comment

Choose a reason for hiding this comment

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

Cool workflow, especially now that we're actively supporting multiple branches.
If I'm reading this correctly, we're adding the ability to use 'backport-active-', and yet still retaining the option to backport only to specific branches. If that's the case, then LGTM unless somebody else thinks of an edge case that I haven't considered.

@v1v v1v merged commit 9e9d79a into elastic:main Apr 22, 2025
15 checks passed
@ev1yehor
Copy link
Contributor Author

@karenzone You are right. We can use backport-active-* labels to backport changes to active branches while you can still use old labels to specific branches. And If you want to backport changes to specific branch in future, you can always use @mergify backport $branch command.

@ev1yehor
Copy link
Contributor Author

ev1yehor commented Apr 22, 2025

@karenzone

 "backport-active-all" is the label that automatically backports to all 8.* and 9.* active branches.
 "backport-active-8" is the label that automatically backports to all active minor branches for the 8 major.
 "backport-active-9" is the label that automatically backports to all active minor branches for the 9 major.

List of active branches taken from json: https://storage.googleapis.com/artifacts-api/snapshots/branches.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify enhancement New feature or request needs-writer-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants