You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2021/01/15 15:48:23 UTC
[phoenix] branch master updated: PHOENIX-6316 :
git_jira_fix_version_check.py should identify fixed Jira without any commit
This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push:
new 4b444cd PHOENIX-6316 : git_jira_fix_version_check.py should identify fixed Jira without any commit
4b444cd is described below
commit 4b444cde9091c15b6a8af367dc05b807c6774860
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Fri Jan 15 17:37:44 2021 +0530
PHOENIX-6316 : git_jira_fix_version_check.py should identify fixed Jira without any commit
---
dev/misc_utils/README.md | 10 ++++++++++
dev/misc_utils/git_jira_fix_version_check.py | 20 ++++++++++++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/dev/misc_utils/README.md b/dev/misc_utils/README.md
index 5e85b21..f6946e0 100644
--- a/dev/misc_utils/README.md
+++ b/dev/misc_utils/README.md
@@ -28,6 +28,9 @@ messages with any of these issues:
3. Jira does not have expected fixVersion
4. Jira has expected fixVersion, but it is not yet resolved
+Moreover, this script also finds any resolved Jira with expected
+fixVersion but without any corresponding commit present.
+
This should be useful as part of RC preparation.
git_jira_fix_version_check supports python3 and it required
@@ -102,6 +105,13 @@ Found first commit hash after which git history is redundant. commit: 02d5935cbb
Exiting successfully
Jira/Git commit message diff completed: ##############################################
+Any resolved Jira with fixVersion 4.16.0 but corresponding commit not present
+Starting diff: ##############################################
+PHOENIX-6259 is marked resolved with fixVersion 4.16.0 but no corresponding commit found
+PHOENIX-6258 is marked resolved with fixVersion 4.16.0 but no corresponding commit found
+PHOENIX-6255 is marked resolved with fixVersion 4.16.0 but no corresponding commit found
+Completed diff: ##############################################
+
```
diff --git a/dev/misc_utils/git_jira_fix_version_check.py b/dev/misc_utils/git_jira_fix_version_check.py
index 0d1266f..65eaf6c 100644
--- a/dev/misc_utils/git_jira_fix_version_check.py
+++ b/dev/misc_utils/git_jira_fix_version_check.py
@@ -49,6 +49,8 @@ print(git_status_msg)
print('\nJira/Git commit message diff starting: ##############################################')
+issue_set_from_commit_msg = set()
+
for commit in subprocess.check_output(['git', 'log', '--pretty=oneline']).decode(
"utf-8").splitlines():
if commit.startswith(first_exclude_commit_hash):
@@ -77,12 +79,26 @@ for commit in subprocess.check_output(['git', 'log', '--pretty=oneline']).decode
if not expected_fix_version:
print("Jira not present with version: " + fix_version + ". \t Commit: " + commit)
continue
- if issue.fields.resolution is None or issue.fields.resolution.name != 'Fixed':
+ if issue.fields.status is None or issue.fields.status.name not in ('Resolved', 'Closed'):
print("Jira is not resolved yet? \t\t Commit: " + commit)
else:
# This means Jira corresponding to current commit message is resolved with expected
# fixVersion.
# This is no-op by default, if needed, convert to print statement.
- pass
+ issue_set_from_commit_msg.add(project_jira_key + jira_num)
print('Jira/Git commit message diff completed: ##############################################')
+
+print('\nAny resolved Jira with fixVersion ' + fix_version
+ + ' but corresponding commit not present')
+print('Starting diff: ##############################################')
+all_issues_with_fix_version = jira.search_issues(
+ 'project=' + jira_project_name + ' and status in (Resolved,Closed) and fixVersion='
+ + fix_version)
+
+for issue in all_issues_with_fix_version:
+ if issue.key not in issue_set_from_commit_msg:
+ print(issue.key + ' is marked resolved with fixVersion ' + fix_version
+ + ' but no corresponding commit found')
+
+print('Completed diff: ##############################################')