Project

Profile

Help

Story #5250

Add requirements.yaml specification support to collection sync

Added by sajha 11 months ago. Updated 2 months ago.

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

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 57

Description

Requirements with requirements.yml:

We would like to have the ability to use the requirements.yml documented here: https://docs.ansible.com/ansible/devel/dev_guide/collections_tech_preview.html#install-multiple-collections-with-a-requirements-file

---
collections:
# With just the collection name
- my_namespace.my_collection

# With the collection name, version, and source options
- name: my_namespace.my_other_collection
  version: 'version range identifiers (default: ``*``)'
  source: 'The Galaxy URL to pull the collection from (default: ``--api-server`` from cmdline)'

This would sync the collection my_namespace.my_collection and the specified version of my_namespace.my_other_collection. The version specification would be similar to https://docs.ansible.com/ansible/devel/dev_guide/collections_tech_preview.html#installing-an-older-version-of-a-collection

Field Name

The field on the CollectionRemote should be called requirements_file.

Validation of data Requirement

Note that Pulp expects to have all content from a single source and does not expect to have sources defined per content item (as the "source" field allows in this spec). As such, Pulp should not accept a requirements.yaml that contains a definition for "source". If specified when creating/saving a remote it should be rejected as invalid with a message from the user.

Associated revisions

Revision ab990542 View on GitHub
Added by Fabricio Aguiar 11 months ago

Add specification support to collection sync

closes #5250

History

#1 Updated by bmbouter 11 months ago

So to confirm, the idea is that this would store a text blob (like the copy/pasted contents of a requirements.yaml) ?

If so, I think that would work fine, but the "source" option could be challenging. Specifically, the Remote.url specified the remote source to pull all content from, but this spec allows for that remote to be item, by, item.

How should pulp_ansible work when the user specifies remote A to be galaxy.ansible.com and the "source" field says example.com ?

#2 Updated by jsherril@redhat.com 11 months ago

I think it might be okay to reject requirements with a source specified

#3 Updated by bmbouter 11 months ago

  • Description updated (diff)

Revising to require validation that ensures "source" is not set.

#4 Updated by daviddavis 11 months ago

  • Groomed changed from No to Yes
  • Sprint set to Sprint 57

#5 Updated by bmbouter 11 months ago

  • Subject changed from Use requirements.yaml specification for whitelisting collections to sync to Add requirements.yaml specification support to collection sync
  • Description updated (diff)

#6 Updated by fao89 11 months ago

  • Status changed from NEW to POST

#7 Updated by Anonymous 11 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#8 Updated by ggainey 2 months ago

  • Tags Katello added
  • Tags deleted (Katello-P2)

Please register to edit this issue

Also available in: Atom PDF