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

Adding Github action for auto backport PR creation #1600

Merged
merged 2 commits into from
Nov 23, 2021

Conversation

VachaShah
Copy link
Collaborator

Signed-off-by: Vacha vachshah@amazon.com

Description

This Github action creates backport PR automatically when appropriate labels are added to the PR on main. Once the original PR gets merged to main, this Github action will open backport PR. For example, if we want to backport a PR to 1.x, add label backport 1.x to the original PR, once this PR is merged, the Github action will open a backport to 1.x PR from the original PR.

Reference: https://github.com/marketplace/actions/backporting
I tried this on my own repo and was able to create appropriate backport PRs. Example: VachaShah/TestGithubActions#7

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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: Vacha <vachshah@amazon.com>
@VachaShah VachaShah requested a review from a team as a code owner November 22, 2021 18:37
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success ff660bc

@CEHENKLE
Copy link
Member

Thanks for finding this, @VachaShah Very cool :)

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success ff660bc

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

I think it's worth adding a "backports" section to https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md as well.

Once we are happy with this, let's run a campaign for 1.3 to add this to all plugins/components?

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success ff660bc
Log 1176

Reports 1176

@dblock
Copy link
Member

dblock commented Nov 22, 2021

@VachaShah Feel free to merge! Want to create some backport labels, especially for 1.x branch, too?

Signed-off-by: Vacha <vachshah@amazon.com>
@VachaShah
Copy link
Collaborator Author

@VachaShah Feel free to merge! Want to create some backport labels, especially for 1.x branch, too?

Thanks @dblock ! I added the details in the DEVELOPER_GUIDE.md for auto backports. Will create backport labels as well.

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 88a6d75

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 88a6d75

@VachaShah
Copy link
Collaborator Author

@VachaShah Feel free to merge! Want to create some backport labels, especially for 1.x branch, too?

Thanks @dblock ! I added the details in the DEVELOPER_GUIDE.md for auto backports. Will create backport labels as well.

Hi @dblock , looks like I don't have permissions to create labels on the repo.

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 88a6d75
Log 1179

Reports 1179

@VachaShah
Copy link
Collaborator Author

@dblock Can you merge this PR?

Copy link
Member

@saratvemulapalli saratvemulapalli left a comment

Choose a reason for hiding this comment

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

Love it!

@saratvemulapalli saratvemulapalli merged commit 8477290 into opensearch-project:main Nov 23, 2021
@dblock
Copy link
Member

dblock commented Nov 24, 2021

@VachaShah

  1. Did you resolve the labels problem?
  2. Should we run a campaign in 1.3 to use this workflow for all plugins? If yes, start by creating a parent issue in https://github.com/opensearch-project/opensearch-plugins/issues similar to Default CI Java Version to Java 11, run tests on 8, 11, 14 (and attempt 17) opensearch-plugins#64 and link it from campaigns in [RELEASE] Release version 1.3.0 opensearch-build#889

@saratvemulapalli
Copy link
Member

I believe this would help all the repositories in the opensearch-project.
Instead of https://github.com/opensearch-project/opensearch-plugins, can we create an issue and document it in https://github.com/opensearch-project/.github?

@dblock
Copy link
Member

dblock commented Nov 24, 2021

I believe this would help all the repositories in the opensearch-project. Instead of https://github.com/opensearch-project/opensearch-plugins, can we create an issue and document it in https://github.com/opensearch-project/.github?

That would be in https://github.com/opensearch-project/project-meta maybe? Either way, I want to make sure we can track that campaign for plugins as part of an OpenSearch release, separately, as well.

@VachaShah
Copy link
Collaborator Author

@VachaShah

  1. Did you resolve the labels problem?
  2. Should we run a campaign in 1.3 to use this workflow for all plugins? If yes, start by creating a parent issue in https://github.com/opensearch-project/opensearch-plugins/issues similar to Default CI Java Version to Java 11, run tests on 8, 14 and 17 opensearch-plugins#64 and link it from campaigns in [RELEASE] Release version 1.3.0 opensearch-build#889

@dblock, yes the OpenSearch label was created and I will do the same for other repos. I will create the parent issue shortly for other repos and track one for plugins as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants