From a704b0cb135b5d5fc29e05422c6bb77e13e0deb4 Mon Sep 17 00:00:00 2001 From: Kashif Faraz Date: Wed, 2 Oct 2024 13:29:30 +0530 Subject: [PATCH 1/4] Simplify release script find-missing-backports.py --- distribution/bin/find-missing-backports.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/distribution/bin/find-missing-backports.py b/distribution/bin/find-missing-backports.py index 88e7418d2975..e412527d00f9 100755 --- a/distribution/bin/find-missing-backports.py +++ b/distribution/bin/find-missing-backports.py @@ -64,17 +64,18 @@ def find_next_url(links): return None -if len(sys.argv) != 5: - sys.stderr.write('usage: program \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 \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) @@ -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: From be90a9df1c162a1aa234d9498c77840604172794 Mon Sep 17 00:00:00 2001 From: Kashif Faraz Date: Wed, 2 Oct 2024 14:58:26 +0530 Subject: [PATCH 2/4] Do not run UTs and ITs for changes in dist/bin scripts --- .github/workflows/unit-and-integration-tests-unified.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-and-integration-tests-unified.yml b/.github/workflows/unit-and-integration-tests-unified.yml index 544787e79a3c..272f400b0315 100644 --- a/.github/workflows/unit-and-integration-tests-unified.yml +++ b/.github/workflows/unit-and-integration-tests-unified.yml @@ -23,6 +23,7 @@ on: - 'examples/**/jupyter-notebooks/**' - 'web-console/**' - 'website/**' + - 'distribution/bin/**' branches: - master - '[0-9]+.[0-9]+.[0-9]+' # release branches From 8ec7d4ad2615b9260cf89631932bfeac993c3966 Mon Sep 17 00:00:00 2001 From: Kashif Faraz Date: Wed, 2 Oct 2024 16:24:53 +0530 Subject: [PATCH 3/4] Do not run UTs and ITs for changes in dist/bin scripts --- .github/workflows/unit-and-integration-tests-unified.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-and-integration-tests-unified.yml b/.github/workflows/unit-and-integration-tests-unified.yml index 272f400b0315..eb1bc1a82229 100644 --- a/.github/workflows/unit-and-integration-tests-unified.yml +++ b/.github/workflows/unit-and-integration-tests-unified.yml @@ -36,6 +36,7 @@ on: - 'examples/**/jupyter-notebooks/**' - 'web-console/**' - 'website/**' + - 'distribution/bin/**' branches: - master - '[0-9]+.[0-9]+.[0-9]+' # release branches From bc03e7d821f533689f3d24688d6de6dcc6f7c9d1 Mon Sep 17 00:00:00 2001 From: Kashif Faraz Date: Fri, 4 Oct 2024 08:12:54 +0530 Subject: [PATCH 4/4] Sort list in workflow file --- .github/workflows/unit-and-integration-tests-unified.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-and-integration-tests-unified.yml b/.github/workflows/unit-and-integration-tests-unified.yml index eb1bc1a82229..f2b9214d1aa8 100644 --- a/.github/workflows/unit-and-integration-tests-unified.yml +++ b/.github/workflows/unit-and-integration-tests-unified.yml @@ -19,11 +19,11 @@ on: paths-ignore: - '**/*.md' - 'dev/**' + - 'distribution/bin/**' - 'docs/**' - 'examples/**/jupyter-notebooks/**' - 'web-console/**' - 'website/**' - - 'distribution/bin/**' branches: - master - '[0-9]+.[0-9]+.[0-9]+' # release branches @@ -32,11 +32,11 @@ on: paths-ignore: - '**/*.md' - 'dev/**' + - 'distribution/bin/**' - 'docs/**' - 'examples/**/jupyter-notebooks/**' - 'web-console/**' - 'website/**' - - 'distribution/bin/**' branches: - master - '[0-9]+.[0-9]+.[0-9]+' # release branches