Project

Profile

Help

Story #7815

As a plugin writer, pulpcore ensures that a job working directory is set/removed properly

Added by ttereshc 4 months ago. Updated 21 days ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 90
Quarter:

Description

Motivation

At the moment, it's plugin's responsibility to be sure that any temporary files it's working with are stored in the directory dedicated to a running job. It's done by using the content manager WorkingDirectory.
The context manager doesn't support nesting which causes a usability problem.
Plugin writer needs to carefully create and recreate the working directory every time it deals with files to avoid nesting (e.g. stages API uses WorkingDirectory so some nesting can come from the using of pulpcore code).

Suggestion

  • let tasking management in pulpcore take care of managing the working directory for every job (even if it doesn't need it)
  • raise DeprecationWarning for the context manager WorkingDirectory
  • make the context manager WorkingDirectory no-op since pulpcore sets the directory for any job
  • file a task to remove the deprecation and the context manager on Y+1 version of pulpcore

Related issues

Blocks File Support - Story #7469: as a Pulp File user, I can have my repository auto published and distributedPOST

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks RPM Support - Story #6353: As a user, I can mirror RPM repository content and metadataNEW

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 425acafb View on GitHub
Added by dalley 21 days ago

Enable nesting WorkingDirectory()

re: #7815 https://pulp.plan.io/issues/7815

Revision 35598c05 View on GitHub
Added by dalley 21 days ago

Tasks get a working directory by default

closes: #7815 https://pulp.plan.io/issues/7815

History

#1 Updated by mdellweg 4 months ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#2 Updated by dalley about 2 months ago

  • Sprint set to Sprint 88

#3 Updated by rchan about 1 month ago

  • Sprint changed from Sprint 88 to Sprint 89

#4 Updated by dalley 30 days ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
  • Parent task set to #7469

Necessary in order to do auto-publish-and-distribute, which may have multiple working directories.

#5 Updated by pulpbot 30 days ago

  • Status changed from ASSIGNED to POST

#6 Updated by dalley 29 days ago

  • Sprint/Milestone set to 3.10.0

#7 Updated by dalley 29 days ago

  • Sprint/Milestone deleted (3.10.0)

#8 Updated by dalley 29 days ago

  • Parent task deleted (#7469)

#9 Updated by dalley 29 days ago

  • Blocks Story #7469: as a Pulp File user, I can have my repository auto published and distributed added

#10 Updated by dalley 29 days ago

  • Blocks Story #6353: As a user, I can mirror RPM repository content and metadata added

#11 Updated by dalley 29 days ago

In the implementation, I went with a slightly different approach. Instead of making WorkingDirectory a no-op, I just fixed the issue preventing them from nesting. I think we still want manual WorkingDirectorys because we plugin writers may have any number of reasons to want a clean one, and we can't enforce that if we only have a single, shared working directory for the entire task. We've seen issues recently with the migration plugin where sub-repo publishing had errors seemingly caused by sharing WorkingDirectory with the publish of the outer repo.

#12 Updated by rchan 27 days ago

  • Sprint changed from Sprint 89 to Sprint 90

#13 Updated by dalley 21 days ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

Please register to edit this issue

Also available in: Atom PDF