-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[JENKINS-68562] Fix Git checkouts for controllers running on Windows #1273
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
Conversation
I've confirmed with interactive testing on Windows that the change resolves the issue as reported in JENKINS-68562 |
I think we want the destination branch to be the v4.11.x branch rather than the master branch so that we can release the change with as few differences as possible. The changes on the master branch seem fine, but being more conservative in this case seems worth the effort. |
@MarkEWaite Ok, up to you as far as basing this against v4.11.x vs master. Daniel and I also discussed it, and the changes between those versions seemed pretty harmless so we figured it probably wouldn't matter either way. |
That sounds great to me. Targeting the master branch is actually easier for me. I've run the unit test on Windows with the change and confirmed that the test passes. I've run the unit test on Windows without the change and confirmed that the test fails. Thanks for writing the test! |
Ok, given the new unit test and that @MarkEWaite has very generously tested this interactively, I think it's ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks right to me. I've tested interactively and confirmed that it is well-behaved in cases that were failing with the version in release 4.11.2.
I've run the automated tests on my RHEL-8, Windows, and other operating systems. Working well. I plan to release a new version today |
Release build has started for 4.11.3. Releases from other branches will need a backport of the fix. |
Git plugin 4.11.3 and 4.9.2 have been released with this fix. Thanks @dwnusbaum ! |
JENKINS-68562 Fix Git checkouts for controllers running on Windows
The security fix in b295606 broke all Git checkouts that use remotes with an explicit protocol on Jenkins controllers running on Windows. This PR fixes that issue by catching
InvalidPathException
in the relevant location.I have not tested the PR (I do not have access to a Windows machine right now). I am not sure if we easily can create automated tests with non-
file
remotes that would exercise this behavior. We should be able to test it at surface level using mocks or maybe via a complexWireMock
harness for a more thorough test.Just filing a draft PR for now since I have not tested anything.
CC @Pldi23
Checklist
Types of changes