Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Galaxy importer warnings/errors - version 5.0.0 #1799

Open
samccann opened this issue Nov 22, 2024 · 1 comment
Open

Galaxy importer warnings/errors - version 5.0.0 #1799

samccann opened this issue Nov 22, 2024 · 1 comment

Comments

@samccann
Copy link

samccann commented Nov 22, 2024

SUMMARY

The following problems were found with the recent upload of the collection to Automation Hub (using galaxy-importer 0.4.22):

  • no roles description (for all roles)
Loading role organizations 
Could not get role description, no role metadata found 
  • ansible-lint warnings:
Linting collection via ansible-lint... 
roles/content_view_version_cleanup/tasks/find_and_delete_unused_cv_versions.yml:17: jinja[spacing]: Jinja2 spacing could be improved: {{ (__satellite_versions.resources | rejectattr('environments') | rejectattr('composite_content_view_ids') | rejectattr('published_in_composite_content_view_ids') | map(attribute='version') | map('float') | sort | map('string') | reverse | list)[(satellite_content_view_version_cleanup_keep | int):] }} -> {{ (__satellite_versions.resources | rejectattr('environments') | rejectattr('composite_content_view_ids') | rejectattr('published_in_composite_content_view_ids') | map(attribute='version') | map('float') | sort | map('string') | reverse | list)[(satellite_content_view_version_cleanup_keep | int) :] }} (warning) 
roles/content_view_version_cleanup/tasks/main.yml:22: jinja[spacing]: Jinja2 spacing could be improved: {{ (__satellite_ccv.versions | rejectattr('environment_ids') | map(attribute='version') | map('float') | sort | map('string') | reverse | list)[(satellite_content_view_version_cleanup_keep | int):] }} -> {{ (__satellite_ccv.versions | rejectattr('environment_ids') | map(attribute='version') | map('float') | sort | map('string') | reverse | list)[(satellite_content_view_version_cleanup_keep | int) :] }} (warning) 
roles/content_view_version_cleanup/tasks/main.yml:29: yaml[line-length]: Line too long (164 > 160 characters) 
roles/content_view_version_cleanup/tasks/main.yml:37: yaml[line-length]: Line too long (161 > 160 characters) 
  • Python 2.7 error
Running sanity test "compile" on Python 2.7 
ERROR: Found 1 compile issue(s) on python 2.7 which need to be resolved: 
ERROR: plugins/module_utils/_apypie.py:628:47: SyntaxError: super().__init__(f'{msg} - {error}') 
See documentation for help: https://docs.ansible.com/ansible-core/2.16/dev_guide/testing/sanity/compile.html 
  • pylint errors
Running sanity test "pylint" 
ERROR: Found 3 pylint issue(s) which need to be resolved: 
ERROR: tests/vcr_python_wrapper.py:30:15: bad-chained-comparison: Suspicious 2-part chained comparison using semantically incompatible operators ('==' and 'in') 
ERROR: tests/vcr_python_wrapper.py:42:19: unnecessary-list-index-lookup: Unnecessary list index lookup, use 'v' instead 
ERROR: tests/vcr_python_wrapper.py:42:109: unnecessary-list-index-lookup: Unnecessary list index lookup, use 'v' instead 
ISSUE TYPE
  • Bug Report
ANSIBLE VERSION

COLLECTION VERSION
5.0.0
KATELLO/FOREMAN VERSION

STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS

@samccann
Copy link
Author

Someone gave a nice summary that I'm reposting here in case it helps:

In all of your roles you are missing the file "meta/main.yml" file. This means that you don't have a description of what each of your roles do in your documentation. Here is an example of how it should look.
Add a config.yml file to your "tests" directory and set your required_python version to 3.7 or higher. You are encountering errors for compiling the collection with 2.7. Here is an example here

evgeni added a commit that referenced this issue Nov 25, 2024
evgeni added a commit that referenced this issue Nov 25, 2024
this avoids sanity on Galaxy complain that it can't import the code on
Python 2 (which we don't support anymore)

Refs: #1799
evgeni added a commit that referenced this issue Nov 25, 2024
this avoids sanity on Galaxy complain that it can't import the code on
Python 2 (which we don't support anymore)

Refs: #1799
evgeni added a commit that referenced this issue Nov 25, 2024
this avoids sanity on Galaxy complain that it can't import the code on
Python 2 (which we don't support anymore)

Refs: #1799
evgeni added a commit that referenced this issue Nov 25, 2024
this avoids sanity on Galaxy complain that it can't import the code on
Python 2 (which we don't support anymore)

Refs: #1799
ehelms pushed a commit that referenced this issue Nov 25, 2024
this avoids sanity on Galaxy complain that it can't import the code on
Python 2 (which we don't support anymore)

Refs: #1799
ehelms pushed a commit that referenced this issue Nov 25, 2024
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

No branches or pull requests

1 participant