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

Refactor branch deletion for backports #15983

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

gaiksaya
Copy link
Member

@gaiksaya gaiksaya commented Sep 18, 2024

Description

Refactor branch deletion for backports as current workflow has been failing 2 months.
https://github.com/opensearch-project/OpenSearch/actions/workflows/delete_backport_branch.yml

The author of the currently used action specified that it is no longer maintained. SvanBoxel/delete-merged-branch#257 (comment)
Hence, refactoring to use GH scripts. Works as expected. See https://github.com/gaiksaya/opensearch-build-libraries/actions/runs/10930031518

Related Issues

Resolves #15984

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@github-actions github-actions bot added the bug Something isn't working label Sep 18, 2024
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

Food for thought; I'd rather we have a sweep and clean job on a cron trigger that looked for merged/closed backport/ branches and then deleted them that tying this to PR actions. That would also address all those not-yet-deleted branches that are hanging out.

@peternied peternied added backport 2.x Backport to 2.x branch and removed backport 2.x Backport to 2.x branch labels Sep 18, 2024
@peternied
Copy link
Member

@gaiksaya I'll merge and lets check back in tomorrow to see if this is working.

@gaiksaya
Copy link
Member Author

@gaiksaya I'll merge and lets check back in tomorrow to see if this is working.

Sure! Thanks! Please merge when you see fit.

@peternied peternied merged commit 3a1b6d1 into opensearch-project:main Sep 18, 2024
48 of 54 checks passed
sachinpkale pushed a commit to sachinpkale/OpenSearch that referenced this pull request Sep 19, 2024
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@gaiksaya
Copy link
Member Author

Hi @peternied @kotwanikunal Do we need to backport this to 2.x?

@peternied
Copy link
Member

@gaiksaya Yes it does. However, I'd rather confirm that it works on backports done from main first.

And unfortunately, it looks like it isn't working, link
image

@gaiksaya
Copy link
Member Author

gaiksaya commented Sep 19, 2024

Looks like indentation issue. Fixed here: #16003
Thanks!

@gaiksaya
Copy link
Member Author

Also looks like the workflows in the merged branches are the ones that run. Hence, need to backport in order to delete branches for the PRs that get merged in 2.x

@peternied
Copy link
Member

@gaiksaya Can you create the backport pr to do this?

@gaiksaya
Copy link
Member Author

@gaiksaya Can you create the backport pr to do this?

Done! #16008

amberzsy pushed a commit to amberzsy/OpenSearch-public that referenced this pull request Sep 22, 2024
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Branches used in backport PRs are not getting deleted
3 participants