This is an automated email from the ASF dual-hosted git repository.
pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 6e366f4 SUBMARINE-1250. Fix error when merging pull request
6e366f4 is described below
commit 6e366f414fef773b8fa0cb6cc58588198f5a2a92
Author: Kevin Su <[email protected]>
AuthorDate: Wed Mar 30 05:53:52 2022 +0800
SUBMARINE-1250. Fix error when merging pull request
Signed-off-by: Kevin Su <pingsutwapache.org>
### What is this PR for?
<!-- A few sentences describing the overall goals of the pull request's
commits.
First time? Check out the contributing guide -
https://submarine.apache.org/contribution/contributions.html
-->
https://github.com/apache/submarine/blob/46a6f079e79fac188a990dbda4f2449673d9f439/dev-support/cicd/merge_submarine_pr.py#L264-L270
Error message:
```
File "/merge_submarine_pr.py", line 371, in <module>
resolve_jira_issues(title, merged_refs, jira_comment)
File "/merge_submarine_pr.py", line 307, in resolve_jira_issues
resolve_jira_issue(merge_branches, comment, jira_id)
File "/merge_submarine_pr.py", line 271, in resolve_jira_issue
for v in default_fix_versions:
File "/merge_submarine_pr.py", line 270, in <lambda>
default_fix_versions = map(lambda x: fix_version_from_branch(x,
versions).name, merge_branches)
File "/merge_submarine_pr.py", line 228, in fix_version_from_branch
return versions[0]
TypeError: 'filter' object is not subscriptable
```
In python3, the filter will return iterate, so we have to convert it to a
list.
### What type of PR is it?
[Bug Fix]
### Todos
* [ ] - Task
### What is the Jira issue?
<!-- * Open an issue on Jira
https://issues.apache.org/jira/browse/SUBMARINE/
* Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg.
`SUBMARINE-23. PR title`
-->
### How should this be tested?
<!--
* First time? Setup Travis CI as described on
https://submarine.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed
behavior
* Outline any manual steps to test the PR here.
-->
### Screenshots (if appropriate)
### Questions:
* Do the license files need updating?No
* Are there breaking changes for older versions?No
* Does this need new documentation? No
Author: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Closes #917 from pingsutw/SUBMARINE-1250 and squashes the following commits:
9ac4a7e3 [Kevin Su] Lint fixed
d09b1c88 [Kevin Su] SUBMARINE-1250. Fix error when merging pull request
---
dev-support/cicd/merge_submarine_pr.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dev-support/cicd/merge_submarine_pr.py
b/dev-support/cicd/merge_submarine_pr.py
index a69afcb..9a33014 100755
--- a/dev-support/cicd/merge_submarine_pr.py
+++ b/dev-support/cicd/merge_submarine_pr.py
@@ -267,7 +267,9 @@ def resolve_jira_issue(merge_branches, comment,
default_jira_id=""):
# Consider only x.y.z versions
versions = filter(lambda x: re.match("\d+\.\d+\.\d+", x.name), versions)
- default_fix_versions = map(lambda x: fix_version_from_branch(x,
versions).name, merge_branches)
+ default_fix_versions = map(
+ lambda x: fix_version_from_branch(x, list(versions)).name,
merge_branches
+ )
for v in default_fix_versions:
# Handles the case where we have forked a release branch but not yet
made the release.
# In this case, if the PR is committed to the master branch and the
release branch, we
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]