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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/unit-and-integration-tests-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
paths-ignore:
- '**/*.md'
- 'dev/**'
- 'distribution/bin/**'
- 'docs/**'
- 'examples/**/jupyter-notebooks/**'
- 'web-console/**'
Expand All @@ -31,6 +32,7 @@ on:
paths-ignore:
- '**/*.md'
- 'dev/**'
- 'distribution/bin/**'
- 'docs/**'
- 'examples/**/jupyter-notebooks/**'
- 'web-console/**'
Expand Down
16 changes: 7 additions & 9 deletions distribution/bin/find-missing-backports.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,18 @@ def find_next_url(links):
return None


if len(sys.argv) != 5:
sys.stderr.write('usage: program <github-username> <previous-release-branch> <current-release-branch> <milestone-number>\n')
sys.stderr.write(" e.g., program myusername 0.17.0 0.18.0 30")
sys.stderr.write(" e.g., The milestone number for Druid 30 is 56, since the milestone has the url https://github.com/apache/druid/milestone/56\n")
sys.stderr.write(" It is also necessary to set a GIT_TOKEN environment variable containing a personal access token.")
if len(sys.argv) != 4:
sys.stderr.write('Incorrect program arguments.\n')
sys.stderr.write('Usage: program <github-username> <previous-major-release-branch> <current-major-release-branch>\n')
sys.stderr.write(" e.g., program myusername 29.0.0 30.0.0\n")
sys.stderr.write(" Ensure that the title of the milestone is the same as the release branch.\n")
sys.stderr.write(" Ensure that a GIT_TOKEN environment variable containing a personal access token has been set.\n")
sys.exit(1)

github_username = sys.argv[1]
previous_branch = sys.argv[2]
release_branch = sys.argv[3]
milestone_number = int(sys.argv[4])
milestone_title = release_branch

master_branch = "master"
command = "git log {}..{} --oneline | tail -1".format(master_branch, previous_branch)
Expand Down Expand Up @@ -102,9 +103,6 @@ def find_next_url(links):

print("Number of release PR subjects: {}".format(len(release_pr_subjects)))
# Get all closed PRs and filter out with milestone
milestone_url = "https://api.github.com/repos/apache/druid/milestones/{}".format(milestone_number)
resp = requests.get(milestone_url, auth=(github_username, os.environ["GIT_TOKEN"])).json()
milestone_title = resp['title']
pr_items = []
page = 0
while True:
Expand Down
Loading