[JIRA] [git-plugin] (JENKINS-29287) Merge build fails when ref contains remote's name

0 views
Skip to first unread message

andrei.neculau@gmail.com (JIRA)

unread,
Jul 8, 2015, 6:35:03 AM7/8/15
to jenkinsc...@googlegroups.com
Andrei Neculau created an issue
 
Jenkins / Bug JENKINS-29287
Merge build fails when ref contains remote's name
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Components: git-plugin
Created: 08/Jul/15 10:34 AM
Priority: Blocker Blocker
Reporter: Andrei Neculau

There are a few closed issues mentioning the change in behaviour of the Remote field of the "Merge Build" section. This is NOT a duplicate of those.

It seems the code is joining the Remote and the Ref(Branch) with a "/", but that is incorrect when the ref is "origin/trunk" (this is recommended when trunk is ambiguous) — the command will become "git rev-parse /origin/trunk^

{commit}

".

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 8, 2015, 8:45:01 AM7/8/15
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-29287
 
Re: Merge build fails when ref contains remote's name

Can you provide step-by-step instructions to show the problem you are seeing, and what you're expecting to see instead?

I don't understand based on your description if you're describing the value of branch to build (if so, have you reviewed the help on the branch to build field where it provides many different examples of ways to specify the branch or branches to be built) or if you're describing the branch to merge, or something entirely different.

I can make guesses based on the phrases you've used, but we'll spend a lot of time guessing and working back and forth when it would be much better if you provide a series of numbered steps which show the problem when those steps are taken.

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 8, 2015, 9:05:03 AM7/8/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29287
Can you provide step-by-step instructions to show the problem you are seeing, and what you're expecting to see instead?

I don't understand based on your description if you're describing the value of branch to build (if so, have you reviewed the help on the branch to build field where it provides many different examples of ways to specify the branch or branches to be built) or if you're describing the branch to merge, or something entirely different.

I can make guesses based on the phrases you've used, but we'll spend a lot of time guessing and working back and forth when it would be much better if you provide a series of numbered steps which show the problem when those steps are taken.


It would also help if there are closed issues which you believe are specifically not related that you reference them by name, as in JENKINS-28911 (if that were one of the bugs which you specifically believe is not related to this bug)

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 8, 2015, 9:07:01 AM7/8/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29287
Can you provide step-by-step instructions to show the problem you are seeing, and what you're expecting to see instead?

I don't understand based on your description if you're describing the value of branch to build (if so, have you reviewed the help on the branch to build field where it provides many different examples of ways to specify the branch or branches to be built) or if you're describing the branch to merge, or something entirely different.

I can make guesses based on the phrases you've used, but we'll spend a lot of time guessing and working back and forth when it would be much better if you provide a series of numbered steps which show the problem when those steps are taken.

It would also help if there are closed issues which you believe are specifically not related that you reference them by name, as in JENKINS-28911 (if that were one of the bugs which you specifically believe is not related to this bug)


I would also help when describing changed behavior if you can identify the plugin version where the change occurred, or the last plugin version where the behavior matched what you wanted.

andrei.neculau@gmail.com (JIRA)

unread,
Jul 8, 2015, 9:16:01 AM7/8/15
to jenkinsc...@googlegroups.com

The first comment describes exactly the problem (and a workaround)

andrei.neculau@gmail.com (JIRA)

unread,
Jul 8, 2015, 9:20:03 AM7/8/15
to jenkinsc...@googlegroups.com
Andrei Neculau updated an issue
 
Change By: Andrei Neculau
Environment: Jenkins 1.584
git-plugin 2.3.5
There are a few closed issues mentioning I experience  the  change  same problem as  in  behaviour of  JENKINS-21845 but  the  Remote field of the  suggested workaround is not applicable (because my branch ref is very specific  " Merge Build origin/master "  section ) .  This is NOT a duplicate of those

The failed command looks like "git rev-parse /origin/master"
.  Adding the remote name "origin" in the merge build configuration only ends up to running the command like "git rev-parse origin/origin/master".

It seems the code is joining the Remote and the Ref(Branch) with a "/", but that is incorrect when the ref is "origin/
trunk master " (this is recommended when trunk is ambiguous) --- the command will become "git rev-parse /origin/ trunk master ^{commit}".

andrei.neculau@gmail.com (JIRA)

unread,
Jul 8, 2015, 9:21:01 AM7/8/15
to jenkinsc...@googlegroups.com
Andrei Neculau edited a comment on Bug JENKINS-29287
 
Re: Merge build fails when ref contains remote's name
The first comment  in JENKINS-21845  describes exactly the problem (and a workaround  which is not applicable for this issue )

andrei.neculau@gmail.com (JIRA)

unread,
Jul 8, 2015, 9:22:01 AM7/8/15
to jenkinsc...@googlegroups.com

Mark, I have updated the ticket accordingly (I hope). Thank you

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 8, 2015, 7:41:01 PM7/8/15
to jenkinsc...@googlegroups.com

You say that the first comment in

JENKINS-21845 describes the problem exactly, but that the work around is not applicable. The first quote says:

I think you may have a different issue than is described in that posting on the mailing list. The "ambiguous argument" may be due to the absence of a remote name in the call to "git rev-parse". The failing seems to be "git rev-parse /developAutoMerge^

Unknown macro: {commit}

", but I think it should be something like "git rev-parse origin/developAutoMerge^

".
In the "Advanced" section of the git repository portion of the job definition, you'll find a field labeled "Name". That field needs a value for the merge use case you're attempting. I set mine to "upstream" and "downstream" to remind myself which one should be the destination of the push.

Please explain why that work around is not applicable. For example, why can't you declare your destination branch as "master" and the repository name as "origin"?

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 8, 2015, 7:42:02 PM7/8/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29287
You say that the first comment in JENKINS-21845  describes the problem exactly, but that the work around is not applicable. The first quote says:

{quote}

I think you may have a different issue than is described in that posting on the mailing list. The "ambiguous argument" may be due to the absence of a remote name in the call to
 '''  "git rev-parse" ''' . The failing seems to be  '''  "git rev-parse /developAutoMerge^
{commit}"
''' , but I think it should be something like "git rev-parse origin/developAutoMerge^{commit}".

In the "Advanced" section of the git repository portion of the job definition, you'll find a field labeled "Name". That field needs a value for the merge use case you're attempting. I set mine to "upstream" and "downstream" to remind myself which one should be the destination of the push.
{quote}


Please explain why that work around is not applicable.  For example, why can't you declare your destination branch as "master" and the repository name as "origin"?

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 8, 2015, 7:43:03 PM7/8/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29287
You say that the first comment in JENKINS-21845  describes the problem exactly, but that the work around is not applicable. The first quote says:

{quote}
I think you may have a different issue than is described in that posting on the mailing list. The "ambiguous argument" may be due to the absence of a remote name in the call to
 '''  
"git rev-parse" ''' . The failing seems to be  '''
 
{noformat}
"git rev-parse /developAutoMerge^
{commit}" ''',

{noformat}
 but I think it should be something like "git rev-parse origin/developAutoMerge^{commit}".
In the "Advanced" section of the git repository portion of the job definition, you'll find a field labeled "Name". That field needs a value for the merge use case you're attempting. I set mine to "upstream" and "downstream" to remind myself which one should be the destination of the push.
{quote}

Please explain why that work around is not applicable.  For example, why can't you declare your destination branch as "master" and the repository name as "origin"?

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 8, 2015, 7:43:04 PM7/8/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29287
You say that the first comment in JENKINS-21845  describes the problem exactly, but that the work around is not applicable. The first quote says:

{quote}
I think you may have a different issue than is described in that posting on the mailing list. The "ambiguous argument" may be due to the absence of a remote name in the call to 
"git rev-parse". The failing seems to be 
{noformat}
"git rev-parse /developAutoMerge^{commit}"
{noformat}
but I think it should be something like
 
{noformat}
 "git rev-parse origin/developAutoMerge^{commit}" .
{noformat}
In the "Advanced" section of the git repository portion of the job definition, you'll find a field labeled "Name". That field needs a value for the merge use case you're attempting. I set mine to "upstream" and "downstream" to remind myself which one should be the destination of the push.
{quote}

Please explain why that work around is not applicable.  For example, why can't you declare your destination branch as "master" and the repository name as "origin"?

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 8, 2015, 7:47:01 PM7/8/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29287
You say that the first comment in JENKINS-21845  describes the problem exactly, but that the work around is not applicable. The first  quote  comment  says:


{quote}
I think you may have a different issue than is described in that posting on the mailing list. The "ambiguous argument" may be due to the absence of a remote name in the call to 
"git rev-parse". The failing seems to be 
{noformat}
"git rev-parse /developAutoMerge^{commit}"
{noformat}
but I think it should be something like 
{noformat}
"git rev-parse origin/developAutoMerge^{commit}"
{noformat}
In the "Advanced" section of the git repository portion of the job definition, you'll find a field labeled "Name". That field needs a value for the merge use case you're attempting. I set mine to "upstream" and "downstream" to remind myself which one should be the destination of the push.
{quote}

Please explain why that work around is not applicable.  For example, why can't you declare your destination branch as "master" and the repository name as "origin"?

andrei.neculau@gmail.com (JIRA)

unread,
Jul 9, 2015, 3:14:01 AM7/9/15
to jenkinsc...@googlegroups.com

I cannot declare my destination branch as such, since it comes down as a generator parameter. The sender uses origin/master (a value accepted by the git plugin in the "SCM" block) and cannot be changed.

Several other branch formats (accepted by the git plugin in the "SCM" block) would fail as well: refs/heads/master, remotes/origin/master, refs/remotes/origin/master.

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 24, 2016, 9:30:01 PM7/24/16
to jenkinsc...@googlegroups.com

Andrei Neculau I don't understand your latest comment clearly enough to use it to duplicate the problem you're seeing. Can you provide a set of step by step instructions that will show the problem you're describing?

You said:

The sender uses origin/master (a value accepted by the git plugin in the "SCM" block) and cannot be changed

Does that mean upstream job definition is passing a parameter to a downstream job, and you can't separate the parameters into separate values for repository name and branch name? Or, is there some other meaning in what you said?

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 24, 2016, 9:31:01 PM7/24/16
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-29287
[~andreineculau] I don't understand your latest comment clearly enough to use it to duplicate the problem you're seeing.  Can you provide a set of step by step instructions that will show the problem you're describing?

You said:

{quote}The sender uses origin/master (a value accepted by the git plugin in the "SCM" block) and cannot be changed{quote}


Does that mean upstream job definition is passing a parameter to a downstream job, and you can't separate the parameters into separate values for repository name and branch name?  Or, is there some other meaning in what you said?


Which location accepts "origin/master" in the SCM block that cannot be changed?  The branch name (where it could be changed to "master", as far as I know), or the refspec, or something else?

nicolas.deloof@gmail.com (JIRA)

unread,
Apr 24, 2019, 10:28:23 AM4/24/19
to jenkinsc...@googlegroups.com
Nicolas De Loof assigned an issue to Unassigned
 
Change By: Nicolas De Loof
Assignee: Nicolas De Loof
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 20, 2020, 12:34:02 AM1/20/20
to jenkinsc...@googlegroups.com
Mark Waite resolved as Done
 

I can't duplicate this issue as reported.

Change By: Mark Waite
Status: Open Resolved
Resolution: Done
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 20, 2020, 12:34:03 AM1/20/20
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Done
Change By: Mark Waite
Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages