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-27734] Shelve any kind of item #14

Merged
merged 2 commits into from
Sep 7, 2019

Conversation

PierreBtz
Copy link
Contributor

Not only buildable ones (Freestyles, Pipelines) but also Folders
for instance.

NB only line 70 changed in UnshelveProjectExecutable, rest is due to a wrong (CRLF) line ending on the previous version.

CC @reviewbybees

@cpfeiffer
Copy link

What's the status of this? Shelving jobs and folders would greatly improve automatic job cleanup by the jobdsl plugin (automatically shelving unused jobs is a bit safer than automatically deleting them entirely...).

@PierreBtz
Copy link
Contributor Author

@cpfeiffer I didn't have a heavily used Jenkins instance at hand to test well this change. The change itself allows to shelve almost anything so it's quite a big change, I'd really like to have it tested properly.

In case you are interested, I can refresh the PR, merge it and release a beta version of the plugin with the fix.

@cpfeiffer
Copy link

@PierreBtz that would be great! From looking at the code, I'm wondering if the changes to ShelveProjectTask (e.g. 07ba880#diff-97084c54679364747fdb01425511447bR35 etc.) might have a negative effect. Maybe check for instanceof BuildableItem and return the proper results if true?

Besides that I could imagine issues with nested items, e.g. jobs nested in folders. "Someone" might need to take care that shelving a toplevel folder will not interfere the shelving of a nested job (if shelving can run concurrently, that is).

Not only buildable ones (Freestyles, Pipelines) but also Folders
for instance.
@PierreBtz PierreBtz force-pushed the pbeitz/JENKINS-27734 branch from 07ba880 to 349a067 Compare September 7, 2019 15:01
@PierreBtz PierreBtz added feature and removed WIP labels Sep 7, 2019
@PierreBtz
Copy link
Contributor Author

@cpfeiffer I rebased the branch and followed your suggestion. Did some test and I'm happy. Once the CI build passes, I'll make an alpha release.

Besides that I could imagine issues with nested items, e.g. jobs nested in folders. "Someone" might need to take care that shelving a toplevel folder will not interfere the shelving of a nested job (if shelving can run concurrently, that is).

That is a good point and something that indeed might happen. Something else is that there is currently no possible reconciliation if somebody unshelve a folder that would partially exist.

I feel I'm opening a door to potential conflicting situations here, that is why I'm releasing an alpha version of the plugin to collect more use cases before making the feature generally available.
At the moment I intend to warn people in the documentation about this release and those use cases and work iteratively.

@PierreBtz PierreBtz self-assigned this Sep 7, 2019
@PierreBtz PierreBtz merged commit 5dc264b into jenkinsci:master Sep 7, 2019
@PierreBtz PierreBtz deleted the pbeitz/JENKINS-27734 branch September 7, 2019 18:52
@PierreBtz
Copy link
Contributor Author

Version 3.0-alpha-1 released in the experimental update center. See here to retrieve a plugin from it: https://jenkins.io/doc/developer/publishing/releasing-experimental-updates/

@cpfeiffer
Copy link

Awesome, will try it!

@cpfeiffer
Copy link

My simple tests withs shelving and unshelving of projects and folders on different levels were successful. 👍

@PierreBtz
Copy link
Contributor Author

@cpfeiffer any extended feedback on real case usage of this feature? I'd like to cut a new official (non beta) release of the plugin with it, having some feedback would help me determine if the feature is safe enough.

@cpfeiffer
Copy link

Thanks for asking. We're using it successfully since then, without any issues at all. We don't (need to) unshelve often but everything we did was successful. So from my side this is a 👍

@PierreBtz
Copy link
Contributor Author

PierreBtz commented May 2, 2020

@cpfeiffer I just released version 3.0 with this new feature: https://github.com/jenkinsci/shelve-project-plugin/releases/tag/shelve-project-plugin-3.0.

Thanks again for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants