Story #3399
closedAs a user I can sync from a docker registry
0%
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)
- Add upstream_name to the DockerImporter
- Add upstream_name to DockerImporterSerializer (including user-facing help_text):
- Create a sync task that accepts (importer_pk, repository_pk)
- Dispatch the sync task in the DockerImporterViewSet.sync detail route
- custom Declarative Version stage to de-duplicate tag names.
Related issues
Updated by amacdona@redhat.com over 6 years ago
Should this story be for "mirror" and "additive" sync modes?
Updated by tomckay@redhat.com over 6 years ago
Mirror-on-sync would be a very welcome addition to the base user story.
Updated by amacdona@redhat.com about 6 years ago
- Sprint Candidate changed from Yes to No
Updated by amacdona@redhat.com about 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to amacdona@redhat.com
Updated by dkliban@redhat.com about 6 years 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 HttpDownloader[0]. 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 here[1]
The DockerRemote needs to override download_factory[2] 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 factory[3].
[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
Updated by amacdona@redhat.com about 6 years 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
Updated by amacdona@redhat.com about 6 years ago
- Sprint changed from Sprint 43 to Sprint 44
Added by amacdona@redhat.com about 6 years ago
Updated by amacdona@redhat.com about 6 years ago
- Status changed from ASSIGNED to MODIFIED
Updated by bherring almost 6 years ago
- Related to Test #4259: As a user I can sync from a docker registry added
Updated by ipanova@redhat.com about 5 years ago
- Project changed from Docker Support to Container Support
Updated by ipanova@redhat.com almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
fix functional tests