You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ZEPPELIN-6089][INFRA][FOLLOWUP] Consider multiple digits when comparing version numbers
### What is this PR for?
This PR fixes some issues in the `dev/merge_zeppelin_pr.py` to make it smarter in suggesting "backport branch" and "fixed versions".
1. improve the `x.y.z` version comparing
For versions: `["0.9.1", "0.10.1", "0.11.3", "0.12.0"]`
Previously, it was a simple string comparison, so the desc sorted result is `["0.9.1", "0.12.0", "0.11.3", "0.10.1"]`; this PR changes it by interpreting each x, y, z as an int value and comparing sequence, thus the desc sorted result is `["0.12.0", "0.11.3", "0.10.1", "0.9.1"]`
2. improve the `branch-x.y` branch comparing
similar to 1, `branch-0.10` is higher than `branch-0.9`
3. dedup `found_versions`
before
```
Enter comma-separated fix version(s) [0.12.0,0.12.0]:
```
after
```
Enter comma-separated fix version(s) [0.12.0]:
```
### What type of PR is it?
Improvement
### Todos
### What is the Jira issue?
ZEPPELIN-6089
### How should this be tested?
Manually tested by using the updated script to merge three PRs.
```
$ dev/merge_zeppelin_pr.py
git rev-parse --abbrev-ref HEAD
Which pull request would you like to merge? (e.g. 34): 4850
=== JIRA ZEPPELIN-6112 ===
Summary Unable to serve documentation website
Assignee Chan Ho Lee
Status Open
Url https://issues.apache.org/jira/browse/ZEPPELIN-6112
Affected []
=== Pull Request #4850 ===
title [ZEPPELIN-6112] Fix running documentation website server
source tbonelee/fix-docs
target master
url https://api.github.com/repos/apache/zeppelin/pulls/4850
Proceed with merging pull request #4850? (y/N): y
git config --get user.name
git config --get user.email
Pull request #4850 merged!
Merge hash: aa5abd5
git fetch apache master
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (1/1), 1.45 KiB | 742.00 KiB/s, done.
From github.com:apache/zeppelin
* branch master -> FETCH_HEAD
4aff03b..aa5abd5 master -> apache/master
Would you like to pick aa5abd5 into another branch? (y/N): y
Enter a branch name [branch-0.12]:
git fetch apache branch-0.12:PR_TOOL_PICK_PR_4850_BRANCH-0.12
From github.com:apache/zeppelin
* [new branch] branch-0.12 -> PR_TOOL_PICK_PR_4850_BRANCH-0.12
git checkout PR_TOOL_PICK_PR_4850_BRANCH-0.12
Switched to branch 'PR_TOOL_PICK_PR_4850_BRANCH-0.12'
git cherry-pick -sx aa5abd5
Pick complete (local ref PR_TOOL_PICK_PR_4850_BRANCH-0.12). Push to apache? (y/N): y
git push apache PR_TOOL_PICK_PR_4850_BRANCH-0.12:branch-0.12
Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 10 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 4.27 KiB | 4.27 MiB/s, done.
Total 10 (delta 7), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (7/7), completed with 7 local objects.
remote:
remote: GitHub found 197 vulnerabilities on apache/zeppelin's default branch (18 critical, 68 high, 87 moderate, 24 low). To find out more, visit:
remote: https://github.com/apache/zeppelin/security/dependabot
remote:
To github.com:apache/zeppelin.git
3cadfe1..671eca8 PR_TOOL_PICK_PR_4850_BRANCH-0.12 -> branch-0.12
git rev-parse PR_TOOL_PICK_PR_4850_BRANCH-0.12
Restoring head pointer to ZEPPELIN-6089-followup
git checkout ZEPPELIN-6089-followup
Switched to branch 'ZEPPELIN-6089-followup'
git branch
Deleting local branch PR_TOOL_PICK_PR_4850_BRANCH-0.12
git branch -D PR_TOOL_PICK_PR_4850_BRANCH-0.12
Pull request #4850 picked into branch-0.12!
Pick hash: 671eca8
Would you like to pick aa5abd5 into another branch? (y/N): n
Would you like to update an associated JIRA? (y/N): y
Enter a JIRA id [ZEPPELIN-6112]:
=== JIRA ZEPPELIN-6112 ===
Summary Unable to serve documentation website
Assignee Chan Ho Lee
Status Open
Url https://issues.apache.org/jira/browse/ZEPPELIN-6112
Affected []
Check if the JIRA information is as expected (y/N): y
Enter comma-separated fix version(s) [0.12.0]:
=== JIRA ZEPPELIN-6112 ===
Summary Unable to serve documentation website
Assignee Chan Ho Lee
Status Resolved
Url https://issues.apache.org/jira/browse/ZEPPELIN-6112
Affected []
Fixed ['0.12.0']
Successfully resolved ZEPPELIN-6112 with fixVersions=['0.12.0']!
```
### Screenshots (if appropriate)
### Questions:
* Does the license files need to update? No.
* Is there breaking changes for older versions? No.
* Does this needs documentation? No.
Closes#4851 from pan3793/ZEPPELIN-6089-followup.
Signed-off-by: Jongyoul Lee <[email protected]>
(cherry picked from commit 7fe18f4)
Signed-off-by: Jongyoul Lee <[email protected]>
0 commit comments