jenkinsci / jenkinsci/plugin-installation-manager-tool

[JENKINS-58652] Cleanup Directory if Errors

Open
#268 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
463
Forks
228
Avg merge
31m
Merged PRs (30d)
15

Description

If there are any errors while using the plugin management tool, it will exit. For docker images, the image won't be able to be created if there's an error. However, if a user is running the tool locally, this could leave the set of plugins in the plugin directory in an inconsistent state, in which not all necessary dependencies for a particular plugin were able to be downloaded. Currently, no newly downloaded plugins are deleted if the tool fails. There are a couple options to clean up the plugin directory in the case of an error.

1) The tool could keep track of if all of a particular plugin's dependencies were downloaded, and if so, keep that plugin and its dependencies in the directory, but delete plugins whose dependencies were not fully downloaded.

2) Another option could be to keep track of the initial state of the plugin directory, and if there are any errors, delete all of the newly downloaded plugins and restore the original directory contents.

Reporter: Natasha Stopa
#202

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.