-
Notifications
You must be signed in to change notification settings - Fork 67
Add explicit_cleanup_dirs to cleanup.py #1351
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
base: develop
Are you sure you want to change the base?
Conversation
| for _dir in explicit_cleanup_dirs: | ||
| self.log.debug("Removing explicit cleanup dir {}".format(_dir)) | ||
| try: | ||
| shutil.rmtree(_dir) |
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.
Although I can see the use case - I'm a bit worried that some day, accidentally a wrong path ends up in explicit_cleanup_dirs :') and it ends up wiping a full project or asset folder. :) Or was this the one that by default errors on non-empty folders?
Additionally, I feel like it should not be part of this plug-in. As far as I can see this plug-in is focused on handling stagingDir - and explicitly does not apply to other files. This logic is better kept in either a separate plug-in, or actually part of the explicit cleanup (even though that is ContextPlugin it can iterate over the instances just fine.)
|
Looks like duplicty of ExplicitCleanUp . Just use |
ExplicitCleanup is a context plugin, what I needed was per-instance cleanup. But I agree with Roy about maybe having this inside ExplicitCleanup - and just have it also iterate over the instances being published to fish out The issue with just having it a context plugin is the case where publishing happens to multiple shots on the farm. So if I collect the paths in the publish context - all the cleanup paths for the different shots get added to the
|
|
I really don't understand why you can't use |
Changelog Description
To allow gaffer to publish to multiple contexts in one go, I wanted to be able to specify explicit cleanup directories per-instance, otherwise all the context's paths-to-cleanup would be removed once the first of the publishes would go through. Plus I needed to clean up more folders than just the
stagingDirso cleanup_farm.py does not do it for me (plus, it's a context plugin).Part of RVX's summer of pull requests