Project

Profile

Help

Story #7470

As an user I want to sync collections on demand

Added by fao89 about 1 month ago. Updated 7 days ago.

Status:
POST
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 84
Quarter:

Description

Enable on demand sync for collections


Related issues

Related to Ansible Plugin - Issue #7572: Make MANIFEST.json and DIGEST.json available in the CollectionVersion serializer in the V3 APINEW<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Ansible Plugin - Issue #7632: CollectionVersion.contents are not being syncedCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocked by Pulp - Issue #7568: RepositoryVersionDistribution does not support on_demandCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by fao89 about 1 month ago

our _post_save method is heavily dependent on immediate policy: https://github.com/pulp/pulp_ansible/blob/master/pulp_ansible/app/tasks/collections.py#L432-L456

#2 Updated by fao89 28 days ago

Do we have an endpoint that brings the MANIFEST.json data?

{
 "collection_info": {
  "namespace": "pulp",
  "name": "pulp_installer",
  "version": "3.6.3-1",
  "authors": [
   "Pulp Project Developers <pulp-dev@redhat.com>"
  ],
  "readme": "README.md",
  "tags": [
   "pulp",
   "pulpcore",
   "content",
   "software_repositories",
   "lifecycle_management",
   "content_delivery"
  ],
  "description": "A collection of Ansible roles to install & configure Pulp 3 from PyPI",
  "license": [
   "GPL-2.0-or-later"
  ],
  "license_file": null,
  "dependencies": {},
  "repository": "https://github.com/pulp/pulp_installer",
  "documentation": "https://pulp-installer.readthedocs.io/",
  "homepage": "https://pulpproject.org/",
  "issues": "https://pulp.plan.io/projects/pulp/issues?query_id=156"
 },
 "file_manifest_file": {
  "name": "FILES.json",
  "ftype": "file",
  "chksum_type": "sha256",
  "chksum_sha256": "54757b4a488e5be8666ded617aa213740e03e3387dd30a7a9484611fd5e2fac4",
  "format": 1
 },
 "format": 1
}

#3 Updated by fao89 28 days ago

Apparently, the version endpoint brings all information we need:

URL: https://cloud.redhat.com/api/automation-hub/v3/collections/cyberark/conjur_collection/versions/1.0.3/

{
    "version": "1.0.3",
    "certification": "certified",
    "href": "/api/automation-hub/v3/collections/cyberark/conjur_collection/versions/1.0.3/",
    "created_at": "2020-04-22T05:51:35.004788Z",
    "updated_at": "2020-04-22T05:51:35.004819Z",
    "artifact": {
        "filename": "cyberark-conjur_collection-1.0.3.tar.gz",
        "sha256": "f1b8e8e95b8c8f31c32aeeddc772c4a3fc813545e28902a832e8e83bc38bb0a9",
        "size": 11354
    },
    "collection": {
        "id": "c54a323a-c151-4fbe-ac7e-30e518b1c0be",
        "name": "conjur_collection",
        "href": "/api/automation-hub/v3/collections/cyberark/conjur_collection/"
    },
    "download_url": "https://cloud.redhat.com/api/automation-hub/v3/artifacts/collections/automation-hub/cyberark-conjur_collection-1.0.3.tar.gz",
    "name": "conjur_collection",
    "namespace": {
        "name": "cyberark"
    },
    "metadata": {
        "authors": [
            "CyberArk Business Development (@cyberark-bizdev)",
            "Edward Nunez (@enunez-cyberark)",
            "James Stutes (@JimmyJamCABD)"
        ],
        "contents": [
            {
                "name": "conjur_variable",
                "description": "Fetch credentials from CyberArk Conjur.",
                "content_type": "lookup"
            }
        ],
        "dependencies": {},
        "description": "This is a Collection of CyberArk Conjur/DAP toolkit.",
        "documentation": "",
        "homepage": "",
        "issues": "",
        "license": [
            "Apache-2.0"
        ],
        "repository": "https://github.com/cyberark/ansible-conjur-collection",
        "tags": [
            "security",
            "cyberark",
            "access",
            "account",
            "vault",
            "identity",
            "credential",
            "secret",
            "privileged",
            "conjur",
            "devops"
        ]
    }
}

URL: https://galaxy.ansible.com/api/v2/collections/pulp/pulp_installer/versions/3.6.3/

{
    "id": 3871,
    "href": "https://galaxy.ansible.com/api/v2/collections/pulp/pulp_installer/versions/3.6.3/",
    "download_url": "https://galaxy.ansible.com/download/pulp-pulp_installer-3.6.3.tar.gz",
    "artifact": {
        "filename": "pulp-pulp_installer-3.6.3.tar.gz",
        "size": 90372,
        "sha256": "3b704628bd63c3b4fb1bee9ebc83647fbb06466f270ce3dfc6392b13210b4f41"
    },
    "namespace": {
        "id": 4091,
        "href": "https://galaxy.ansible.com/api/v1/namespaces/4091/",
        "name": "pulp"
    },
    "collection": {
        "id": 446,
        "href": "https://galaxy.ansible.com/api/v2/collections/pulp/pulp_installer/",
        "name": "pulp_installer"
    },
    "version": "3.6.3",
    "hidden": false,
    "metadata": {
        "name": "pulp_installer",
        "tags": [
            "pulp",
            "pulpcore",
            "content",
            "software_repositories",
            "lifecycle_management",
            "content_delivery"
        ],
        "issues": "https://pulp.plan.io/projects/pulp/issues?query_id=156",
        "readme": "README.md",
        "authors": [
            "Pulp Project Developers <pulp-dev@redhat.com>"
        ],
        "license": [
            "GPL-2.0-or-later"
        ],
        "version": "3.6.3",
        "homepage": "https://pulpproject.org/",
        "namespace": "pulp",
        "repository": "https://github.com/pulp/pulp_installer",
        "description": "A collection of Ansible roles to install & configure Pulp 3 from PyPI",
        "dependencies": {},
        "license_file": null,
        "documentation": "https://pulp-installer.readthedocs.io/"
    }
}

Instead of downloading and opening the collection file, we can pass these data through stages API

#4 Updated by fao89 28 days ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fao89
  • Sprint set to Sprint 82

#5 Updated by bmbouter 28 days ago

I don't believe the server side APIs on galaxy.ansible.com and cloud.redhat.com do not provide all attributes that we would need. I believe that blocks this story from continuing.

#6 Updated by pulpbot 28 days ago

  • Status changed from ASSIGNED to POST

#7 Updated by fao89 27 days ago

  • Related to Issue #7572: Make MANIFEST.json and DIGEST.json available in the CollectionVersion serializer in the V3 API added

#8 Updated by fao89 21 days ago

  • Related to Issue #7632: CollectionVersion.contents are not being synced added

#9 Updated by rchan 20 days ago

  • Sprint changed from Sprint 82 to Sprint 83

#10 Updated by fao89 17 days ago

  • Blocked by Issue #7568: RepositoryVersionDistribution does not support on_demand added

#11 Updated by rchan 7 days ago

  • Sprint changed from Sprint 83 to Sprint 84

Please register to edit this issue

Also available in: Atom PDF