[
https://issues.apache.org/jira/browse/HBASE-23888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17043931#comment-17043931
]
Nick Dimiduk commented on HBASE-23888:
--------------------------------------
Okay, some investigation. The workflow looks like this.
* [PreCommit-Admin|https://builds.apache.org/job/PreCommit-Admin/] wakes up
every 10 minutes to query Jira for issues with new attachments. It identifies
"new" based on the build artifact produced by it's previous successful run.
* This runs [a script in Yetus|
https://github.com/apache/yetus/blob/c78ec24c74d6443ee8de768b9e5c855d7001c812/precommit/src/main/python/jenkins-admin.py#L219-L220]
that eventually calls back to the project-specific PreCommit-Build job for
each new attachment.
* In this case, the project-specific job is our [PreCommit-HBASE-Build
|https://builds.apache.org/job/PreCommit-HBASE-Build/].
* That job doesn't specify a field called {{ATTACHMENT_ID}}, so that parameter
is dropped.
* That job invokes Yetus with its target patch being the Jira issue id.
* Yetus's jira plugin has a function called
[{{locate_patch}}|https://github.com/apache/yetus/blob/c78ec24c74d6443ee8de768b9e5c855d7001c812/precommit/src/main/shell/test-patch.d/jira.sh#L156]
that basically just grabs the first patch file that downloads.
* Following that, a function called
[{{determine_branch}}|https://github.com/apache/yetus/blob/c78ec24c74d6443ee8de768b9e5c855d7001c812/precommit/src/main/shell/test-patch.d/jira.sh#L260]
decided to what branch the patch applies.
Thus, pre-commit of attached patch is essentially broken.
> PreCommit-HBASE-Build ignores the `ATTACHMENT_ID` provided by PreCommit-Admin
> -----------------------------------------------------------------------------
>
> Key: HBASE-23888
> URL: https://issues.apache.org/jira/browse/HBASE-23888
> Project: HBase
> Issue Type: Task
> Components: build
> Reporter: Nick Dimiduk
> Priority: Major
>
> It appears that we've dropped the parameter {{ATTACHMENT_ID}} from our
> {{PreCommit-HBASE-Build}} job. (It may be the case that Yetus's
> {{test-patch}} doesn't support specifying what attachment id to test.) The
> result, I believe, is that when a Jira issue has patches attached for more
> than one branch, we only get precommit testing on the patch for master.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)