Skip to content
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

Merged
merged 1 commit into from
Sep 13, 2020
Merged

[JENKINS-37263] Prefer remote references for checkout #942

merged 1 commit into from
Sep 13, 2020

Conversation

Volodjam
Copy link
Contributor

@Volodjam Volodjam commented Aug 10, 2020

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

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • I have interactively tested my changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

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.
@MarkEWaite MarkEWaite added the bugfix Fixes a bug - used by Release Drafter label Aug 24, 2020
@MarkEWaite MarkEWaite changed the title [JENKINS-37263] Prefere remote references for checkout [JENKINS-37263] Prefer remote references for checkout Aug 30, 2020
@0xMarK
Copy link

0xMarK commented Sep 1, 2020

Oh, I need this fix so much!

@MarkEWaite
Copy link
Contributor

@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.

@0xMarK
Copy link

0xMarK commented Sep 2, 2020

@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.
We will upgrade only to a Release version of Jenkins. 😔

@MarkEWaite
Copy link
Contributor

MarkEWaite commented Sep 2, 2020

@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.
We will upgrade only to a Release version of 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.

@MarkEWaite
Copy link
Contributor

@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.

@MarkEWaite
Copy link
Contributor

Interactive testing completed successfully. I can duplicate the problem without the change and the problem is fixed with the change.

@MarkEWaite MarkEWaite merged commit 7f1ab1c into jenkinsci:master Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes a bug - used by Release Drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants