-
Notifications
You must be signed in to change notification settings - Fork 193
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
Unclear behavior/documentation wrt cleaning plugin directory #455
Comments
The current behavior (not cleaning the directory despite the documentation's claim) works in my favor, in theory. Looking at the code, it appears that any plugins in the plugin directory are considered "installed", thus consulted to see if they satisfy other plugin dependencies, and presumably, have any missing dependencies installed as well. My current use-case for pre-populating that directory involves a very simple plugin (it has no plugin dependencies, and likely does not satisfy any plugin dependencies), so I can't easily/quickly validate those assumptions. But I'm currently assuming it does (or could) work that way. If the decision is made to honor the documentation (purging the existing directory), hopefully you'd consider making the equivalent of a |
Changing the current behaviour to honour the documentation would be a breaking change. I'd be on the side of fixing the documentation and the |
Jenkins and plugins versions report
tested with: jenkins-plugin-manager-2.12.8.jar
Several inconsistencies and bugs regarding the cleaning of plugin directory.
--plugin-download-directory
that "The directory will be first deleted, then recreated". However this is not the case.--clean-download-directory
flag in the code here. However the implementation is broken. The directory contents is deleted. The directory itself is left in place. That by itself is not a problem. However the code then tries to re-create the plugin dir and fails with an "The plugin directory already exists" error.At this point it is not even clear what the intended behavior is. The documentation and code are inconsistent. Having the clean-up behavior controlled by a cli-flag seems reasonable and gives most flexibility to users. If that is the goal, needed steps would be:
--plugin-download-directory
flag.--clean-download-directory
What Operating System are you using (both controller, and any agents involved in the problem)?
all
Reproduction steps
Case 1:
Case 2:
Expected Results
Case 1:
plugin directory is deleted and recreated as stated in the documentation or documentation needs to be adapted for the actual behavior
Case 2:
expect no "The plugin directory already exists: plugins" error
Actual Results
Case 1:
plugin directory is not deleted
Case 2:
command fails with "The plugin directory already exists: plugins"
Anything else?
No response
The text was updated successfully, but these errors were encountered: