-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-37263] Prefer remote references for checkout #942
Conversation
If a branch that contains a slash is configured as branch to build and local branch behaviour is configured, then two candidate revisions will be found in case remote branch is ahead of local: configured local branch name and branch name with prefix 'refs/remotes/<remote>/'. The first result will be taken, which can be a local or remote branch depending on sha1 of the revisions.
Oh, I need this fix so much! |
@0xMarK you can help the evaluation by installing the pre-release build and reporting your results. Test results are helpful to evaluators since there are so many ways that Jenkins is used and so many ways that changes can inadvertently break compatibility. |
@MarkEWaite I asked our devops to test out Pre-Release version and he denied the proposition. We have too many critical infrastructure running on our Jenkins. |
You could run a private copy of Jenkins to confirm that the proposed change works for your case. The Jenkins war file and the Jenkins Docker image are both quite simple to launch and use. |
We stumbled on this exact problem. |
@Volodjam I have started the review of this pull request. As part of that, I added several more tests and adjusted formatting of the new tests to use the style that is preferred in the plugin. You can see my commits at https://github.com/MarkEWaite/git-plugin/commits/JENKINS-37263 . I need to interactively confirm that I can see the issue that the fix is resolving and then use this change to confirm that the issue is resolved. Once that is complete, I intend to merge this change and release it. Thanks @vsevolod-fedorov for reporting your test results. Thanks @Volodjam for providing automated tests that show the problem and show that it is resolved with the change. Those two efforts were a compelling motivation for me to review this pull request. |
Interactive testing completed successfully. I can duplicate the problem without the change and the problem is fixed with the change. |
JENKINS-37263 - Prefer remote references for checkout
If a branch that contains a slash is configured as branch to build and local branch behaviour is configured, then two candidate revisions will be found in case remote branch is ahead of local: configured local branch name and branch name with prefix 'refs/remotes//'. The first result will be taken, which can be a local or remote branch depending on sha1 of the revisions. This causes a problem that sometimes remote changes are ignored on checkout from SCM. See JENKINS-37263 for more details.
Checklist
Types of changes