Open falon opened 9 months ago
The Galaxy importer does not install dependencies before extracing docs or running ansible-lint. This causes a lot of errors/warnings that shouldn't be there.
Ref: https://forum.ansible.com/t/galaxy-importer-collection-dependency-handling/3496 (unfortunately there's no reaction from the Galaxy team...)
@alisonlhart Maybe you do know more about the subject? Clearly this does not seem as an issue with the linter itself.
@ssbarnea I wonder if this will be solved by upgrading the ansible-lint dependency. If not, IMO this is definitely something worth opening an issue for on galaxy-importer, especially when seeing the similar docs issue related to dependencies.
I would like to repurpose this bug into a feature: add a rule that ensures that galaxy-importer passes for current collection.
It might sound a little bit recursive but I think we can find a way to avoid recursivity.
The main benefit here is that it reduces the number of checks a content developer needs to perform, as linting will also ensure that collection builds and it does not include unexpected files in that archive.
See https://github.com/ansible/event-driven-ansible/pull/291/files to get an idea about what extra checks were needed, which could easily be included in ansible lint.
I started a discussion before finding some of these issues. So what its worth I've started one: https://github.com/ansible/ansible-lint/discussions/4404
Summary
I run
ansible-lint
before publishing a collection into my Galaxy-NG. Even ifansible-lint
doesn't detect errors or warnings, the publish process shows warning about dependencies.ansible-lint
should warn me if Galaxy-NG has something else to claim.Issue Type
OS / ENVIRONMENT
STEPS TO REPRODUCE
Let suppose I developed a collection with a playbook that use an external role: playbooks/myOS.yml:
Also, let suppose the collection has dependecies in galaxy.yml:
In my local environment I have installed all standalone roles and collections required. Then:
This is all fine. But when I try to publish on Galaxy-NG I see new unexpected warnings:
I can't fix these warnings. I tried to sync remote required collections in Galaxy-NG, but it has no effect.
Desired Behavior
Actual Behavior
See also at the forum thread.
Blocked-By: https://issues.redhat.com/browse/AAH-3375 Related: https://github.com/ansible/galaxy-importer/pull/287