Project

Profile

Help

Task #3184

closed

Story #3209: As a user, I have Repository Versions

Add complete field to Publication.

Added by jortel@redhat.com over 6 years ago. Updated over 4 years ago.

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

100%

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

Description

Problem:

The creation of Publications happens in plugins, so some parts of this description apply to plugins only. The pulpcore changes should be limited to adding the field and preventing use of complete=False publications. The plugins should either update their code to prevent the transaction problem presented below, or use the Publication context manager to be written in https://pulp.plan.io/issues/3295

The current implementation of the publishing task starts an outer transaction. This is undesirable because:

  • Long running transactions can accumulate DB locks which can result in contention.
  • Could exceed DB limitations on rollback segement.
  • Prevents progress reports from being committed.

The following line needs to be removed:

with transaction.atomic():

Without the outer transaction, the publication will be committed half-baked. There needs to be a way to prevent the publication from being used before it is completely constructed. Here is a recap of a list design discussion:

  • Add an attribute called 'complete' to Publication which defaults to False.
  • Update the viewset so that it excludes Publications that have complete=False
  • Update the filterset for Publications to also exclude Publications that have complete=False

This part of the solution:

  1. Add Publication.complete
  2. Obscure rendered by the API when Publication.complete=False

Related issues

Related to File Support - Task #3323: Refit to use the Publication (Facade)CLOSED - CURRENTRELEASEjortel@redhat.com

Actions
Blocks Pulp - Story #3295: As a plugin writer, I have a tool that helps me write tasks that create PublicationsCLOSED - CURRENTRELEASEjortel@redhat.com

Actions

Also available in: Atom PDF