-
Notifications
You must be signed in to change notification settings - Fork 92
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
Adds the ability on render to deleted targeted files or directories #1073
Conversation
Closes #1049 This is to provide a simple mechanism for deprication of files and allowing for targeted deletion of files. Later this functionality can be extented to provide qhub extensions the ability to depricate files within a stage. For how this is just a single list that is populated.
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.
looks like it will do the trick, but i'm slightly concerned deleted_files
might be a confusing name. deleted
raises 🎏 and deprecated_files
or deprecated_conventions
has a softer blow.
qhub/render/__init__.py
Outdated
".terraform", | ||
"__pycache__", | ||
], | ||
deleted_paths=[ |
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.
i think i'm worried that defining these paths deep in the code might wake it hard to manage these deprecations. it seems that this is code style as it is. later, we might want to tear this out into a deprecate.py
file or something.
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.
Thanks for the review @tonyfast. What do you think about the recent additions? I've added an explicit DEPREICATED_FILE_PATHS constant within qhub/depricate.py
. Eventually I'd like to add this logic to our extension mechanism to allow for stages to depricate files.
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.
I'd like to keep the deleted_paths
bit just to communicate that some files will actually be deleted.
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.
All right, the deletion logic has no issues. LGTM! Thanks @costrouc
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.
the approach looks sound. we should fix the spelling of deprecate
before merging.
Made changes and need to wait for CI to pass |
@danlester would you mind reviewing this if it does all you need in #1049 |
This is certainly capable of fixing the problems we've seen, but is probably overkill in terms of expecting developers to use this system mid-release - which is where we've encountered recent problems. Ultimately, the advice for developers is to clear everything out periodically. But we will be able to use this if we keep track of files changed between releases, to avoid the same problems out in the wild. |
Yeup I agree. It's also go practice for us to delete the directory to make sure that the deployment does not depend on the files and hidden state. This PR is there to address issues that user's of qhub will face and make as minimal deletions as possible. |
…1073) * Adds the ability on render to deleted targeted files or directories Closes #1049 This is to provide a simple mechanism for deprication of files and allowing for targeted deletion of files. Later this functionality can be extented to provide qhub extensions the ability to depricate files within a stage. For how this is just a single list that is populated. * Black formatting * Adding qhub/depricate.py to address explicit deprication of files * Black formatting * Need to learn to spell 😄
Closes #1049
This is to provide a simple mechanism for deprication of files and
allowing for targeted deletion of files. Later this functionality can
be extented to provide qhub extensions the ability to depricate files
within a stage. For how this is just a single list that is populated.