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

Simplify release script find-missing-backports.py #17218

Merged
merged 4 commits into from
Oct 4, 2024

Conversation

kfaraz
Copy link
Contributor

@kfaraz kfaraz commented Oct 2, 2024

Changes

  • Remove milestone number argument required by script. The milestone number is used
    only to fetch the milestone title which is always the same as the release branch name.
  • Improve error messages in the script

Usage example

Before

export GIT_TOKEN=abcdef...
python3 find-missing-backports.py 30.0.0 31.0.0 57
Output:

Previous branch: 30.0.0, first commit: c19b784477
Number of release PR subjects: 478
Total PRs for current milestone: 87
Total expected count: 87
Missing backport found for PR 17193, url: https://github.com/apache/druid/pull/17193
Missing backport found for PR 17181, url: https://github.com/apache/druid/pull/17181
Missing backport found for PR 17180, url: https://github.com/apache/druid/pull/17180
Missing backport found for PR 17173, url: https://github.com/apache/druid/pull/17173
Missing backport found for PR 17168, url: https://github.com/apache/druid/pull/17168
Missing backport found for PR 17152, url: https://github.com/apache/druid/pull/17152
Missing backport found for PR 17147, url: https://github.com/apache/druid/pull/17147
Missing backport found for PR 17140, url: https://github.com/apache/druid/pull/17140
Missing backport found for PR 17135, url: https://github.com/apache/druid/pull/17135
Missing backport found for PR 17133, url: https://github.com/apache/druid/pull/17133
Missing backport found for PR 17132, url: https://github.com/apache/druid/pull/17132
Missing backport found for PR 17021, url: https://github.com/apache/druid/pull/17021
Missing backport found for PR 16991, url: https://github.com/apache/druid/pull/16991

After

export GIT_TOKEN=abcdef...
python3 find-missing-backports.py 30.0.0 31.0.0
Output

Previous branch: 30.0.0, first commit: c19b784477
Number of release PR subjects: 478
Total PRs for current milestone: 87
Total expected count: 87
Missing backport found for PR 17193, url: https://github.com/apache/druid/pull/17193
Missing backport found for PR 17181, url: https://github.com/apache/druid/pull/17181
Missing backport found for PR 17180, url: https://github.com/apache/druid/pull/17180
Missing backport found for PR 17173, url: https://github.com/apache/druid/pull/17173
Missing backport found for PR 17168, url: https://github.com/apache/druid/pull/17168
Missing backport found for PR 17152, url: https://github.com/apache/druid/pull/17152
Missing backport found for PR 17147, url: https://github.com/apache/druid/pull/17147
Missing backport found for PR 17140, url: https://github.com/apache/druid/pull/17140
Missing backport found for PR 17135, url: https://github.com/apache/druid/pull/17135
Missing backport found for PR 17133, url: https://github.com/apache/druid/pull/17133
Missing backport found for PR 17132, url: https://github.com/apache/druid/pull/17132
Missing backport found for PR 17021, url: https://github.com/apache/druid/pull/17021
Missing backport found for PR 16991, url: https://github.com/apache/druid/pull/16991

Error message

Command

python3 find-missing-backports.py kfaraz 30.0.0
Incorrect program arguments.
Usage: program <github-username> <previous-major-release-branch> <current-major-release-branch>
  e.g., program myusername 29.0.0 30.0.0
  Ensure that the title of the milestone is the same as the release branch.
  Ensure that a GIT_TOKEN environment variable containing a personal access token has been set.

@github-actions github-actions bot added the GHA label Oct 2, 2024
Copy link
Contributor

@LakshSingla LakshSingla left a comment

Choose a reason for hiding this comment

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

Can you please update the release guide with instructions on how to use the script.

@kfaraz
Copy link
Contributor Author

kfaraz commented Oct 3, 2024

Can you please update the release guide with instructions on how to use the script.

Sure, let me update the release guide.
I still haven't figured out how to ensure that UT workflows are not triggered when changes are made to distribution/bin files. Need to handle that too.

@kfaraz
Copy link
Contributor Author

kfaraz commented Oct 3, 2024

@LakshSingla , there isn't any usage description of the other scripts either (see screenshot below). So, I guess we can add them in a separate PR itself.

Screenshot 2024-10-03 at 11 07 47 AM

@@ -23,6 +23,7 @@ on:
- 'examples/**/jupyter-notebooks/**'
- 'web-console/**'
- 'website/**'
- 'distribution/bin/**'
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: sort them here and below

@@ -35,6 +36,7 @@ on:
- 'examples/**/jupyter-notebooks/**'
- 'web-console/**'
- 'website/**'
- 'distribution/bin/**'
Copy link
Contributor

Choose a reason for hiding this comment

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

@kfaraz re:

I still haven't figured out how to ensure that UT workflows are not triggered when changes are made to distribution/bin files. Need to handle that too.

This paths-ignore config you have added should skip the UT/IT workflows. Once the change is merged into master, you can test it by modifying one of the Python scripts (or in a private branch). Since there are changes to the workflow files in this PR, all the jobs will be triggered.

Copy link
Contributor Author

@kfaraz kfaraz Oct 4, 2024

Choose a reason for hiding this comment

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

Ah, I feared it was that but assumed that workflow files would be excluded by default.

Thanks for the clarification!

@kfaraz kfaraz merged commit e41648f into apache:master Oct 4, 2024
91 checks passed
@kfaraz
Copy link
Contributor Author

kfaraz commented Oct 4, 2024

Thanks for the reviews, @LakshSingla , @abhishekrb19 !

@kfaraz kfaraz deleted the simplify_backport_script branch October 4, 2024 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants