Project

General

Profile

Actions

Bug #31322

closed

repository update immediately after repository creation fails due to race condition {"base_path":["This field must be unique."]}

Added by Justin Sherrill about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Fixed in Releases:
Found in Releases:

Description

Repository creation is a syncronous task, but spawns an async task to generate metadata. With pulp3 as part of the metadata generation it create a distribution, but this is spawned as an async task that runs even after the 'creation' response is returned to the user. If the user immediately requests an update to the repo (which also triggers a metadata generate), and the timing is just right, the app will attempt to create the distribution twice, resulting in: {"base_path":["This field must be unique."]}

A couple options to resolve this:

  • pre-create the distribution (not sure if we can do this without a publication, need to investigate)
  • change the creation/update apis to be async and let the user 'wait'
  • better handle this race condition within the distribution creation code
Actions

Also available in: Atom PDF