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

Add backport action to workflow #43886

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

gopidesupavan
Copy link
Contributor

@gopidesupavan gopidesupavan commented Nov 11, 2024

Adding backport action workflow , to automate PR's that require backport to other branches.

This backports the merged commit to the specified backport branch lable ex: backport-to-v2-10-test, then it uses v2-10-test as the target branch to to backport

Backport action repo: https://github.com/sorenlouv/backport-github-action/


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@gopidesupavan
Copy link
Contributor Author

@amoghrajesh thanks for the suggestion :)

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

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

I fail to see where we configure the target branch.

.github/workflows/backport-action.yml Outdated Show resolved Hide resolved
@gopidesupavan
Copy link
Contributor Author

I fail to see where we configure the target branch.

ah it would take from the label, backport-to-v2-10-test, so here v2-10-test is the target branch

@gopidesupavan gopidesupavan force-pushed the add-backport-action-to-ci-workflow branch from 00a473d to 05b0e01 Compare November 11, 2024 16:20
@potiuk
Copy link
Member

potiuk commented Nov 11, 2024

I fail to see where we configure the target branch.

ah it would take from the label, backport-to-v2-10-test, so here v2-10-test is the target branch

Yeah, We will just have to create appropriate labels for all past versions.

@potiuk potiuk force-pushed the add-backport-action-to-ci-workflow branch from 05b0e01 to d0eca75 Compare November 11, 2024 19:07
@potiuk
Copy link
Member

potiuk commented Nov 11, 2024

I rebased it to account for latest static check fixes.

@gopidesupavan
Copy link
Contributor Author

I fail to see where we configure the target branch.

ah it would take from the label, backport-to-v2-10-test, so here v2-10-test is the target branch

Yeah, We will just have to create appropriate labels for all past versions.

Yes agreed, not sure how to test? do we have any prs to backport? 😄

@potiuk
Copy link
Member

potiuk commented Nov 11, 2024

Yes agreed, not sure how to test? do we have any prs to backport? 😄

Absolutely: #43885 should be backported to all branches. Perfect candidate :D. I will rebase and create/apply backport branches when this one is merged :)

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

Looks cool!
Do you prepare labels with a description such that we know what to pick.

Looking forward to automate the manual burden!

@potiuk
Copy link
Member

potiuk commented Nov 11, 2024

Looks cool! Do you prepare labels with a description such that we know what to pick.

Looking forward to automate the manual burden!

I will do it when backporting #43885 to ALL past branches :)

@potiuk potiuk merged commit 9ee9e52 into apache:main Nov 11, 2024
77 checks passed
@potiuk
Copy link
Member

potiuk commented Nov 11, 2024

And I will delete the old branches after testing :). We want to have quick label selection.

@potiuk
Copy link
Member

potiuk commented Nov 11, 2024

Ah.... We will need to get approval from INFRA

sorenlouv/backport-github-action@ad888e978060bc1b2798690dd9d03c4036560947 is not allowed to be used in 
apache/airflow. Actions in this workflow must be: within a repository that belongs to your Enterprise account, created by 
GitHub, verified in the GitHub Marketplace, or matching the following:
 */*@[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]+, AdoptOpenJDK/install-jdk@*, 
TobKed/label-when-approved-action@*, actions-cool/issues-helper@*, actions-rs/*, al-cheb/configure-pagefile-action@*, amannn/action-semantic-pull-request@*, apache/*, burrunan/gradle-cache-action@*, 
bytedeco/javacpp-presets/.github/actions/*, chromaui/action@*, codecov/codecov-action@*, 
container-tools/kind-action@*, container-tools/microshift-action@*, 
dawidd6/action-download-artifact@*, delaguardo/setup-graalvm@*, 
docker://jekyll/jekyll:*, docker://pandoc/core:2.9, eps1lon/actions-label-merge-conflict@*, 
gaurav-nelson/github-action-markdown-link-check@*, golangci/*, gr2m/twitter-together@*, 
gradle/wra...

@potiuk
Copy link
Member

potiuk commented Nov 11, 2024

Created a JIRA issue https://issues.apache.org/jira/browse/INFRA-26262

@gopidesupavan
Copy link
Contributor Author

Ah.... We will need to get approval from INFRA

sorenlouv/backport-github-action@ad888e978060bc1b2798690dd9d03c4036560947 is not allowed to be used in 
apache/airflow. Actions in this workflow must be: within a repository that belongs to your Enterprise account, created by 
GitHub, verified in the GitHub Marketplace, or matching the following:
 */*@[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]+, AdoptOpenJDK/install-jdk@*, 
TobKed/label-when-approved-action@*, actions-cool/issues-helper@*, actions-rs/*, al-cheb/configure-pagefile-action@*, amannn/action-semantic-pull-request@*, apache/*, burrunan/gradle-cache-action@*, 
bytedeco/javacpp-presets/.github/actions/*, chromaui/action@*, codecov/codecov-action@*, 
container-tools/kind-action@*, container-tools/microshift-action@*, 
dawidd6/action-download-artifact@*, delaguardo/setup-graalvm@*, 
docker://jekyll/jekyll:*, docker://pandoc/core:2.9, eps1lon/actions-label-merge-conflict@*, 
gaurav-nelson/github-action-markdown-link-check@*, golangci/*, gr2m/twitter-together@*, 
gradle/wra...

oh i see :)

@gopidesupavan
Copy link
Contributor Author

Created a JIRA issue https://issues.apache.org/jira/browse/INFRA-26262

nice thank you :)

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

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

Late to the party but this looks good! A mere idea transformed into something working looks fine :)

@potiuk
Copy link
Member

potiuk commented Nov 12, 2024

Hmm. it seems that we might have some hard time (and I kind of agree with it eventually) about using pull_request_target for that one - INFRA (Rightfully) is worried about security of those, so we should likely look for alternative - where we could either user workflow_dispatch kind of workflow or maybe even use some slightly less automated workflow that we write manually.

@potiuk
Copy link
Member

potiuk commented Nov 12, 2024

I will revert it for now

potiuk added a commit to potiuk/airflow that referenced this pull request Nov 12, 2024
@potiuk
Copy link
Member

potiuk commented Nov 12, 2024

@gopidesupavan
Copy link
Contributor Author

Hmm. it seems that we might have some hard time (and I kind of agree with it eventually) about using pull_request_target for that one - INFRA (Rightfully) is worried about security of those, so we should likely look for alternative - where we could either user workflow_dispatch kind of workflow or maybe even use some slightly less automated workflow that we write manually.

Yes agree , we can look some alternatives, I have posted another alternative on slack thread which gives ability to use workflow_dispatch, and I feel we can automate this some way. But not entirely sure thats the right path :) please suggest

@gopidesupavan
Copy link
Contributor Author

Hmm. it seems that we might have some hard time (and I kind of agree with it eventually) about using pull_request_target for that one - INFRA (Rightfully) is worried about security of those, so we should likely look for alternative - where we could either user workflow_dispatch kind of workflow or maybe even use some slightly less automated workflow that we write manually.

Yes agree , we can look some alternatives, I have posted another alternative on slack thread which gives ability to use workflow_dispatch, and I feel we can automate this some way. But not entirely sure thats the right path :) please suggest

https://apache-airflow.slack.com/archives/C0808SJPNGM/p1731388388011519

potiuk added a commit that referenced this pull request Nov 12, 2024
sunank200 pushed a commit to astronomer/airflow that referenced this pull request Nov 12, 2024
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
* include pr number in job name

* update version number and branch name structure
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
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.

4 participants