Skip to content

Fixed ambiguous ls-remote with refs/heads/...#135

Closed
alexanderlink wants to merge 3 commits intojenkinsci:masterfrom
alexanderlink:getHeadRev_refsHeadsFix
Closed

Fixed ambiguous ls-remote with refs/heads/...#135
alexanderlink wants to merge 3 commits intojenkinsci:masterfrom
alexanderlink:getHeadRev_refsHeadsFix

Conversation

@alexanderlink
Copy link
Contributor

This is the smallest possible change to solve the
issue of CI builds being triggered again and again.
ls-remote will always be definite when "refs/heads/"
is used as branchSpec (except if branch names start with "refs/heads/" which no one should do - but could).

I wrote down my findings and thoughts here:
https://github.com/alexanderlink/git-plugin/tree/branchSpecDiscussion

All other issues tried to solve with Pull Request
#129
are still open. But using refs/heads/ would already solve
the CI issue.

This is the smallest possible change to solve the
issue of CI builds being triggered again and again.
ls-remote will always be definite when "refs/heads/<branchName>"
is used as branchSpec.

All other issues tried to solve with Pull Request
jenkinsci#129
are still open. But using refs/heads/ would already solve
the CI issue.
@cloudbees-pull-request-builder

plugins » git-client-plugin #470 ABORTED

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@cloudbees-pull-request-builder

plugins » git-client-plugin #471 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

plugins » git-client-plugin #472 SUCCESS
This pull request looks good

...and refs/tags/ (to be discussed - but does not harm).
@cloudbees-pull-request-builder

plugins » git-client-plugin #473 SUCCESS
This pull request looks good

@alexanderlink
Copy link
Contributor Author

Hi Mark,

I added some integration tests to the git plugin verifying the changes in this (git-client plugin) pull request.
jenkinsci/git-plugin#232

Kind regards,
Alex

@rggjan
Copy link

rggjan commented Jul 18, 2014

Any updates on this? I'm waiting for this to be fixed really badly...

@alexanderlink
Copy link
Contributor Author

@MarkEWaite any update? We're also waiting for this fix. Sooner or later we will get trouble (I already thought about releasing a patch internally).

@MarkEWaite
Copy link
Contributor

I just released 1.9.2 and set the next version to be 1.10.0, preparing for this change and one other change. I spent several hours experimenting with the change last weekend but did not complete enough testing to be confident to release it.

I hope to release 1.10.0 with this fix and 1-2 others within the next 1-2 weeks.

@MarkEWaite
Copy link
Contributor

This change has been merged into git-client-plugin prior to the release of 1.10.0.

@MarkEWaite MarkEWaite closed this Jul 19, 2014
alexanderlink pushed a commit to alexanderlink/git-plugin that referenced this pull request Jul 22, 2014
alexanderlink pushed a commit to alexanderlink/git-plugin that referenced this pull request Jul 22, 2014
alexanderlink pushed a commit to alexanderlink/git-plugin that referenced this pull request Jul 22, 2014
Pull Request 135 was merged. I tested and provide feedback
in this commit
jenkinsci/git-client-plugin#135
jenkinsci#232
alexanderlink pushed a commit to alexanderlink/git-plugin that referenced this pull request Jul 22, 2014
Pull Request 135 was merged. I tested and provide feedback
in this commit
jenkinsci/git-client-plugin#135
jenkinsci#232
@alexanderlink
Copy link
Contributor Author

I added feedback regarding #135 and open issues:
https://github.com/alexanderlink/git-plugin/tree/branchSpecDiscussion

I closed #129 because it became too complex, but maybe we should continue to try solving the remaining issues.

@MarkEWaite
Copy link
Contributor

I'm not clear that we can do much more without breaking compatibility with existing behavior. The existing behavior is flawed (ignoring everything to the left of the rightmost "/" character in the "Branches to build" value unless refs/heads is used), but I think there are too many use cases which will break if we improve the behavior for those old cases.

I think it would be very nice to include help text in the "Branches to build" field of the git plugin which describes the use of refs/heads as a way to unambiguously specify a branch to build.

alexanderlink pushed a commit to alexanderlink/git-plugin that referenced this pull request Jul 23, 2014
...to latest changes in git-client plugin.
jenkinsci/git-client-plugin#135
@alexanderlink
Copy link
Contributor Author

Hi Mark,

I adjusted the help: jenkinsci/git-plugin#244
Is it OK like this?

Thanks and regards,
Alex

MarkEWaite pushed a commit to jenkinsci/git-plugin that referenced this pull request Jul 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants