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

Provide helper for "remove all content from a directory except these names" #3563

Open
happz opened this issue Mar 3, 2025 · 0 comments
Open
Labels
code | plugins Changes to the plugin implementation priority | could low priority, could be included in the next release status | backlog Defined, prioritized, we plan to work on it.

Comments

@happz
Copy link
Collaborator

happz commented Mar 3, 2025

Current prune() of steps and plugins removes the whole directory. If there are members to be preserved, there's _preserved_workdir_members list, but some of the preservable members may be more dynamic, and then the custom prune() turns into a copy & paste madness. See #3511, #3548. We need a helper to do the job, then call it from these custom prune() implementations.

Consider also supporting glob-style patterns, i.e. _preserved_workdir_members = ['guest-logs/*'] should be acceptable, I see no reason why guest should list all guest logs, or why it should have its own custom prune() just to skip this directory.

@happz happz added the code | plugins Changes to the plugin implementation label Mar 3, 2025
@psss psss added priority | could low priority, could be included in the next release status | backlog Defined, prioritized, we plan to work on it. labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code | plugins Changes to the plugin implementation priority | could low priority, could be included in the next release status | backlog Defined, prioritized, we plan to work on it.
Projects
None yet
Development

No branches or pull requests

2 participants