Project

Profile

Help

Issue #4053

Creating a publication does not seem to return the publication in the 'created_resources' field

Added by jsherril@redhat.com about 1 year ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 43

Description

POST /pulp/api/v3/publishers/file/7/publish/

When publishing a publisher, the task returned looks like this:

{"_href":"/pulp/api/v3/tasks/8b0b7411-fa73-4ac3-8bfe-947cd4b33cce/","created":"2018-10-01T19:23:57+00:00","state":"completed","started_at":"2018-10-01T19:23:57+00:00","finished_at":"2018-10-01T19:23:58+00:00","non_fatal_errors":"[]","worker":"/pulp/api/v3/workers/5/","spawned_tasks":[],"progress_reports":[],"created_resources":[]}

Because of this, the user cannot get any reference to the publication they just created.

Associated revisions

Revision bb6a2170 View on GitHub
Added by dkliban@redhat.com about 1 year ago

Problem: created resources OpenAPI schema is not specific enough

Solution: strongly type created resources as an array of strings

This patch changes the CreatedResource serializer to inherit from the RelatedField serializer. This lets the
OpenAPI schema generator know that created resources are URI strings.

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

Revision bb6a2170 View on GitHub
Added by dkliban@redhat.com about 1 year ago

Problem: created resources OpenAPI schema is not specific enough

Solution: strongly type created resources as an array of strings

This patch changes the CreatedResource serializer to inherit from the RelatedField serializer. This lets the
OpenAPI schema generator know that created resources are URI strings.

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

Revision bb6a2170 View on GitHub
Added by dkliban@redhat.com about 1 year ago

Problem: created resources OpenAPI schema is not specific enough

Solution: strongly type created resources as an array of strings

This patch changes the CreatedResource serializer to inherit from the RelatedField serializer. This lets the
OpenAPI schema generator know that created resources are URI strings.

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

History

#1 Updated by jsherril@redhat.com about 1 year ago

  • Tags Katello-P1 added

#2 Updated by CodeHeeler about 1 year ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 43

#3 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dkliban@redhat.com

I am not able to reproduce with the REST API.

Could you please confirm if this is only a problem with the bindings, or if the REST API is not returning the value for you either.

#4 Updated by dkliban@redhat.com about 1 year ago

I tested by generating python bindings. I did not experience the problem with them.

Does this problem also occur for tasks that create repository versions? such as sync and repository version creation APIs

#5 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from ASSIGNED to POST

#6 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from POST to MODIFIED

#7 Updated by kersom about 1 year ago

We have test for CRD publications.

This test uses created_resources to read just created publications.

#8 Updated by ttereshc 11 months ago

  • Tags Pulp 3 added
  • Tags deleted (Katello-P1)

#9 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#10 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF