-
Notifications
You must be signed in to change notification settings - Fork 130
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
Simplified TemporaryDirectoryAllocator.dispose #198
Merged
jglick
merged 11 commits into
jenkinsci:master
from
jglick:TemporaryDirectoryAllocator.dispose
May 19, 2023
+38
−22
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6c30c1f
Simplified TemporaryDirectoryAllocator.dispose
jglick ee7b90a
Forgot some debug code.
jglick 8ae59ec
Do not GC
jglick 99bee8b
Did not notice that DirectoryStream is in fact Iterable
jglick ee72ff5
Better diagnosis for DirectoryNotEmptyException
jglick 52845e4
This GC call should also be unnecessary
jglick 0042f34
Merge branch 'master' of github.com:jenkinsci/jenkins-test-harness in…
jglick 1350354
Merge branch 'master' of github.com:jenkinsci/jenkins-test-harness in…
jglick f3625f0
Merge branch 'master' of https://github.com/jenkinsci/jenkins-test-ha…
jglick c2c92fe
Merge branch 'master' into TemporaryDirectoryAllocator.dispose
jglick de89ed2
Avoid Guava https://github.com/jenkinsci/jenkins-test-harness/pull/19…
jglick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
probably also a junction which I think may be used in some test case and
FIlePath
respects.. (FIles.readAttributes
andisOther
- as a general well it is not a normal directory)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.
I do not know much about junctions. Would they ever really be used in
$JENKINS_HOME
?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.
I'm sure something uses them as we have specific code in Jenkins...
https://github.com/jenkinsci/jenkins/blob/715cdb15b3e855f8b6115aa02200860ed6caf49d/core/src/main/java/hudson/Util.java#L323-L343
I have not come across a real life example, but I'm guessing that it is for a reason?
Maybe it is just an easy way in Jenkins to put some subset of
Job
s in a different drive / pool etc and would not actually be done inside a workspace, or a build directory by jenkins (I do not know if zipping on windows copies the Junction or not, so if a workspace was coppied from an agent where the build created a junction if that would be replcicated on a master).ec2 plugin seems to use them for something?
https://github.com/jenkinsci/ec2-plugin/blob/20f0c2406d62ddbd0d005a2fb15f3f9bb95b3f20/src/main/java/hudson/os/WindowsUtil.java#L109-L121
and the workspacebrowser has a test to prevent traversing them IIRC (so there is at least one use in Jenkins where a workspace will have junctions) https://github.com/jenkinsci/jenkins/blob/9330635821cbcb430b4223b471692f2c9ae862db/test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java#L617
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.
There might be some obscure use case in production servers, but I doubt this would affect functional tests. If there is some plugin which does create a junction during a test for some reason, then it can explicitly remove it before generic cleanup, right?
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.
ahh now https://github.com/jenkinsci/jenkins/pull/8006/files#r1199177115 makes sense