Project

Profile

Help

Story #3399

As a user I can sync from a docker registry

Added by ipanova@redhat.com over 1 year ago. Updated 7 months ago.

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

0%

Platform Release:
Blocks Release:
Target Release - Docker:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 45

Description

As a user i can sync v2 complaint specs docker content from a docker registry which is:
- complaint v2 api specs
- supports basic auth and token auth

This story is complete when:

*I can initiate a sync from Docker Registry by providing feed and upstream name
*The sync completes without error
*I can see that the expected content was added to the repo ( + pagination support)

  1. Add upstream_name to the DockerImporter
  2. Add upstream_name to DockerImporterSerializer (including user-facing help_text):
  3. Create a sync task that accepts (importer_pk, repository_pk)
  4. Dispatch the sync task in the DockerImporterViewSet.sync detail route
  5. custom Declarative Version stage to de-duplicate tag names.

Related issues

Related to Pulp - Test #4259: As a user I can sync from a docker registry CLOSED - COMPLETE Actions

Associated revisions

History

#1 Updated by amacdona@redhat.com over 1 year ago

  • Description updated (diff)

#2 Updated by amacdona@redhat.com over 1 year ago

Should this story be for "mirror" and "additive" sync modes?

#3 Updated by ipanova@redhat.com over 1 year ago

  • Description updated (diff)

#4 Updated by tomckay@redhat.com over 1 year ago

Mirror-on-sync would be a very welcome addition to the base user story.

https://pulp.plan.io/issues/2602

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

  • Description updated (diff)

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

  • Sprint Candidate changed from Yes to No

#7 Updated by rchan about 1 year ago

  • Sprint set to Sprint 43

#8 Updated by amacdona@redhat.com about 1 year ago

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

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

In order to implement the auth mechanism required for docker, the following objects and methods need to be added.

DockerDownloader needs to inherit from HttpDownloader0. The downloader's init needs to accept a keyword argument called 'auth' which is a dictionary. The downloader needs to store the auth dict as a property of the downloader - to be used by run().

The run method of the DockerDownloader needs to add the information from the auth property to the session. Then it needs to perform the download like here1

The DockerRemote needs to override download_factory2 method. The DownloadFactory needs to be instantiated with downloader_overrides that contain a dict with {'https': DockerDownloader}.

The get_downloader() method of DockerRemote needs to check if auth has already been performed against the remote source. If not, perform auth. Then pass the 'auth' dict to the build() method of the factory3.

[0] https://docs.pulpproject.org/en/3.0/nightly/plugins/plugin-api/download.html#httpdownloader
[1] https://github.com/pulp/pulp/blob/master/plugin/pulpcore/plugin/download/http.py#L169
[2] https://docs.pulpproject.org/en/3.0/nightly/plugins/plugin-api/models.html#pulpcore.plugin.models.Remote.download_factory
[3] https://github.com/pulp/pulp/blob/master/plugin/pulpcore/plugin/models/remote.py#L61

#10 Updated by amacdona@redhat.com about 1 year ago

Since token auth sometimes requires frequently updating the Authorization header, it would be much simpler if it was possible to update that header for the entire session. I've opened an upstream issue https://github.com/aio-libs/aiohttp/issues/3299

#11 Updated by amacdona@redhat.com about 1 year ago

  • Sprint changed from Sprint 43 to Sprint 44

#12 Updated by rchan about 1 year ago

  • Sprint changed from Sprint 44 to Sprint 45

#13 Updated by amacdona@redhat.com 12 months ago

  • Status changed from ASSIGNED to MODIFIED

#14 Updated by bherring 11 months ago

  • Related to Test #4259: As a user I can sync from a docker registry added

#15 Updated by bmbouter 7 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF