-
Notifications
You must be signed in to change notification settings - Fork 107
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
Deprecate WorkingDirectory #1162
Conversation
3136867
to
0df6a9b
Compare
Attached issue: https://pulp.plan.io/issues/8231 |
directory. Those will automatically be cleaned up once the task is finished. | ||
|
||
If a task needs to create more temporary directories, it is encouraged to use | ||
``tempfile.TemporaryDirectory(dir=".")`` from the python stdandard library to place them in the |
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.
Typo "stdandard"
If a task needs to create more temporary directories, it is encouraged to use | ||
``tempfile.TemporaryDirectory(dir=".")`` from the python stdandard library to place them in the | ||
tasks working directory. This is however only necessary, if the amount of temporarily saved data is | ||
too much to wait for the automatic cleanup at the end of the task processing. |
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.
Or if you want to avoid file name conflicts.
0df6a9b
to
d26e040
Compare
**Worker and Tasks Directories** | ||
|
||
In pulp each worker is assigned a unique working directory living in ``/var/lib/pulp/tmp/``, and | ||
each started task will have its own clean temporary subdirectory therin as its current working |
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.
therein
maybe?
@@ -41,6 +41,6 @@ def get_policy_statements(self, request, view): | |||
warnings.warn( | |||
"Addressing AccessPolicy via the viewset's classname is deprecated" | |||
"and will be removed in pulpcore==3.10; use the viewset's urlpattern().", | |||
warnings.DeprecationWarning, | |||
DeprecationWarning, |
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.
Should this warning be removed completely? It refers to 3.10.
It's not a part of the scope of this PR but since you are already doing some cleanup here :)
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.
Yes, we are already late here...
@@ -29,7 +29,7 @@ def get_plugin_storage_path(plugin_app_label): | |||
""" | |||
warnings.warn( | |||
"get_plugin_storage_path() is deprecated and will be removed in pulpcore==3.11.", | |||
warnings.DeprecationWarning, | |||
DeprecationWarning, |
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.
We should remove this deprecation as well, I wonder if the get_plugin_storage_path is removed or of there is a task for it
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'll handle this one separately, FYI
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.
d26e040
to
d35d977
Compare
This issue is in the 3.12 milestone.Should we decide to merge it now please update the milestone accordingly. |
Additionally document the use of tempfile.TemporaryDirectory. fixes #8231 https://pulp.plan.io/issues/8231
d35d977
to
f6db3b2
Compare
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!
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.
Thank you!
Removing is scheduled for 3.12 https://pulp.plan.io/issues/8354 |
Additionally document the use of tempfile.TemporaryDirectory.
fixes #8231
https://pulp.plan.io/issues/8231