Skip to content

New way of backporting to active branches using gh action #17551

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 1 commit into from
Apr 14, 2025

Conversation

ev1yehor
Copy link
Contributor

Release notes

What does this PR do?

Adding new github workflow for creating backports to active branches.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

@ev1yehor ev1yehor added enhancement backport-skip Skip automated backport with mergify labels Apr 11, 2025
@ev1yehor ev1yehor self-assigned this Apr 11, 2025
@ev1yehor ev1yehor marked this pull request as ready for review April 11, 2025 18:37
@ev1yehor ev1yehor requested review from v1v and dliappis April 11, 2025 18:37
@v1v v1v requested a review from mashhurs April 14, 2025 07:26
@robbavey
Copy link
Member

It looks like this replaces setup for backport-active-all, backport-active-9 and backport-active-8 in mergify, but I have a couple of questions:

  • The backport-active code refers to a Json configuration file. Is this something that the Logstash team maintains in the Logstash repo in a specific location, or is this centrally maintained?
  • If it is centrally maintained, does backport-active-all also backport to 7.x, as shown in the example, and when does the json config get updated?

@ev1yehor
Copy link
Contributor Author

@robbavey This list of active branches based on the Unified Release process. Yes, backport-active-all also backport to 7.17 as it still in this json: https://storage.googleapis.com/artifacts-api/snapshots/branches.json .
@v1v can you correct me if Im wrong here and also explain how this json being updated?

@robbavey
Copy link
Member

Will backport-active-all will target 7.x once 9.0 is released?

Once 7.x is released, I would expect that most of our backports would be targeted to 8.x and 9.x releases only

@v1v
Copy link
Member

v1v commented Apr 14, 2025

Will backport-active-all will target 7.x once 9.0 is released?

No, we will replace that in the internal implementation, and consumers won't need to do much.

In other words, we decided to change how we used mergify and the definition of what branches to target because the existing implementation in the .mergify.yml does not support dynamic branches.

Instead of using the declarative approach, we use the branches.json as the file to search for the current active branches and mergify github commands to actually use mergify under the hood to create the backports. The GitHub command approach behaves asn the declarative approach

@v1v
Copy link
Member

v1v commented Apr 14, 2025

The backport-active code refers to a Json configuration file. Is this something that the Logstash team maintains in the Logstash repo in a specific location, or is this centrally maintained?

No. We, observability robots, are responsible for maintaining that file. We have been using for nearly three years so far in other places.

If it is centrally maintained, does backport-active-all also backport to 7.x, as shown in the example, and when does the json config get updated?

As I mentioned above, we will change that behaviour to skip 7.17 from the backport-active-all.

Copy link
Member

@robbavey robbavey left a comment

Choose a reason for hiding this comment

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

Thank you @v1v - sounds like once 9.0 is released, this will do what the previous implementation did with the added bonus of us not having to maintain the versions. Sounds good to me!

@ev1yehor ev1yehor added the backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches label Apr 14, 2025
@ev1yehor ev1yehor merged commit 86042f8 into elastic:main Apr 14, 2025
9 checks passed
Copy link
Contributor

@Mergifyio backport 9.0

Copy link

mergify bot commented Apr 14, 2025

backport 9.0

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Apr 14, 2025
(cherry picked from commit 86042f8)

# Conflicts:
#	.mergify.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches backport-skip Skip automated backport with mergify enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants