Skip to content

Commit

Permalink
Fix not using the worker working directory
Browse files Browse the repository at this point in the history
closes pulp#696
  • Loading branch information
dralley committed Apr 8, 2022
1 parent 0b55d9b commit f99c628
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/696.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed some tasks that were using /tmp/ instead of the worker working directory.
2 changes: 1 addition & 1 deletion pulp_container/app/tasks/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def build_image_from_containerfile(
containerfile = Artifact.objects.get(pk=containerfile_pk)
repository = ContainerRepository.objects.get(pk=repository_pk)
name = str(uuid4())
with tempfile.TemporaryDirectory(".") as working_directory:
with tempfile.TemporaryDirectory(dir=".") as working_directory:
path = "{}/".format(working_directory.path)
for key, val in artifacts.items():
artifact = Artifact.objects.get(pk=key)
Expand Down
2 changes: 1 addition & 1 deletion pulp_container/app/tasks/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def create_signature(manifest, reference, signing_service):
pk of created ManifestSignature.
"""
with tempfile.TemporaryDirectory(".") as working_directory:
with tempfile.TemporaryDirectory(dir=".") as working_directory:
# download and write file for object storage
if settings.DEFAULT_FILE_STORAGE != "pulpcore.app.models.storage.FileSystem":
manifest_file = tempfile.NamedTemporaryFile(dir=working_directory, delete=False)
Expand Down

0 comments on commit f99c628

Please sign in to comment.