Skip to content

Fix ansible collection author exceeding 64-character Galaxy limit#14846

Open
ggbecker wants to merge 3 commits into
ComplianceAsCode:masterfrom
ggbecker:fix-collection-author-length
Open

Fix ansible collection author exceeding 64-character Galaxy limit#14846
ggbecker wants to merge 3 commits into
ComplianceAsCode:masterfrom
ggbecker:fix-collection-author-length

Conversation

@ggbecker

@ggbecker ggbecker commented Jul 1, 2026

Copy link
Copy Markdown
Member

Description:

  • Fix collection author exceeding 64-character Galaxy limit
  • Remove email from COLLECTION_AUTHORS so the author string stays within the 64-character limit enforced by galaxy-importer.

Rationale:

  • Fixes:
Invalid collection metadata. Each author in 'authors' list must not be greater than 64 characters

  File "/venv/lib64/python3.12/site-packages/pulpcore/tasking/tasks.py", line 73, in _execute_task
    result = task_function()
             ^^^^^^^^^^^^^^^

Remove email from COLLECTION_AUTHORS so the author string stays
within the 64-character limit enforced by galaxy-importer.
@ggbecker ggbecker added this to the 0.1.82 milestone Jul 1, 2026
The galaxy-importer requires requires_ansible in meta/runtime.yml.
Add generation of this file using ssg.constants.min_ansible_version
as the minimum version (falls back to 2.9 if ssg is not importable).
@ggbecker

ggbecker commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

After attempting to import the collections again, it threw another error fixed by: 6ea20d6

The collections have now been published: https://galaxy.ansible.com/ui/repo/published/redhatofficial/rhel_hardening_roles/

The roles are generated with standalone Galaxy references
(RedHatOfficial.rhel9_stig). When bundled into a collection those
references are wrong. After copying each role, rewrite its README to:
- Use the collection FQCN (redhatofficial.rhel_hardening_roles.rhel9_stig)
- Fix the broken relative link to defaults/main.yml which does not
  resolve in the Galaxy collection UI
@ggbecker

ggbecker commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

I added one more commit: f57855f

To improve how the documentation is displayed, especially for the name of the roles and how they appear in the documentation for the collection, as it is slightly different than the individual ansible roles

@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown

@ggbecker: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.19-images f57855f link true /test 4.19-images
ci/prow/e2e-aws-openshift-node-compliance f57855f link true /test e2e-aws-openshift-node-compliance
ci/prow/e2e-aws-openshift-platform-compliance f57855f link true /test e2e-aws-openshift-platform-compliance

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@Mab879 Mab879 self-assigned this Jul 1, 2026
def generate_runtime_yml(collection_dir):
"""Write meta/runtime.yml declaring the minimum required Ansible version."""
try:
from ssg.constants import min_ansible_version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this needed, seems this requires the ssg module.

$ python ./utils/ansible_roles_to_collection.py 
Unable to find the ssg module. Please run 'source .pyenv.sh'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants