-
Notifications
You must be signed in to change notification settings - Fork 331
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
Unclear documentation requirements when importing a collection #2438
Comments
Think the importer pretty much follows the collections developer guide. |
Concerning the collection developer guide: I read this documentation and it says that the collection structure contains a There is no mention about the required There is also nothing that the collection readme is required, it only says that The rest of the documentation is great, I know that writing an exhaustive documentation is hard. This is just a feedback. |
I just hit the error I've looked through the developing collections docs and I can't see any requirement stated there that the Can you please advise on what is expected in this role README file, and where I can find more information about this requirement? Thanks :) |
I think those errors should also be reported by |
In my case $ ansible-galaxy collection publish --token "$ANSIBLE_GALAXY_PRIVATE_TOKEN" nodiscc-xsrv-1.5.0.tar.gz
Publishing collection artifact 'path/to/xsrv.git/nodiscc-xsrv-1.5.0.tar.gz' to default https://galaxy.ansible.com/api/
Collection has been published to the Galaxy server default https://galaxy.ansible.com/api/
Waiting until Galaxy import task https://galaxy.ansible.com/api/v2/collection-imports/17589/ has completed
ERROR! Galaxy import process failed: No role readme found. (Code: None) The log on https://galaxy.ansible.com/my-imports/18005 says:
I worked around it by creating the file: $ touch roles/README.md
$ ansible-galaxy collection publish --token "$ANSIBLE_GALAXY_PRIVATE_TOKEN" nodiscc-xsrv-1.5.0.tar.gz
# import OK
Same. I think that requiring a |
seems like a bug see ansible/galaxy#2438
Any Updates on this Topic? Will be the REDME for every role a requirement in the future? Or is it a temporary issue still? |
I can still reproduce this
|
to make Ansible Galaxy happy. See ansible/galaxy#2438.
to make Ansible Galaxy happy. See ansible/galaxy#2438.
to make Ansible Galaxy happy. See ansible/galaxy#2438.
to make Ansible Galaxy happy. See ansible/galaxy#2438.
to make Ansible Galaxy happy. See ansible/galaxy#2438.
Bug is still present in Additionally the collection's |
- remove unused changelog target (the changelog should be manually updated during development) - include workaround for ansible/galaxy#2438
I have the same issue and I fix it by including the main.yml file inside a new folder called "meta" on each role which is part of the collection, with some information about the role: dependencies: []
galaxy_info:
author: enmanuelmoreira
role_name: proxmox_lxc
description: Configuring proxmox lxc role.
license: license (MIT)
min_ansible_version: 2.7
platforms:
- name: Ubuntu
versions:
- 20.04
- 22.04
- name: Debian
versions:
- 11 |
This doesn't fix the problem for me, I always had a |
Now the workaround I mentioned earlier doesn't even work anymore:
ansible 8.4.0 (ansible-core 2.15.4) |
Bug Report
SUMMARY
I get some errors when trying to import my collection to update it (it was successfully imported in the past).
Problems are related to the required documentation inside the collection.
I get following successive errors:
Error Message: No role readme found.
: Each role must have a file named<collection>/roles/<role_name>/README.md
(case sensitive).Error Message: Could not find file readme.md
: The collection must have a file name<collection>/readme.md
(Case sensitive, and different to roles)Error Message: No collection readme found
: I already have a<collection>/readme.md
, but I also requires an extra<collection>/README.md
.The requirement of both
<collection>/readme.md
and<collection>/README.md
looks like a bug. Readme files names may be case insensitive (Not only for the collection readme).Error messages generally not help to find exactly what to do (It may give the exact path of awaited files).
The import may scan the whole collection and show all errors at once. Actually it stop on the first error, so the user requires to retry until success when there is multiples errors in its collection.
The documentation does not provides all required information:
STEPS TO REPRODUCE
ansible-galaxy collection build --force && ansible-galaxy collection publish --api-key XXXXXXX *.tar.gz
I tested :
<collection>/docs/<role_name>.md
=>Error Message: No role readme found.
<collection>/roles/<role_name>/readme.md
=>Error Message: No role readme found.
<collection>/roles/<role_name>/README.md
=> OK, for roles<collection>/readme.md
. =>Error Message: No collection readme found
<collection>/README.md
. =>Error Message: Could not find file readme.md
<collection>/readme.md
+ addition of an emptydocs
folder. =>Error Message: No collection readme found
<collection>/readme.md
+ addition of a non emptydocs
folder. =>Error Message: No collection readme found
<collection>/readme.md
and<collection>/README.md
. => OKEXPECTED RESULTS
Collection imported with success.
ACTUAL RESULTS
Collection import failure, see errors bellow.
The text was updated successfully, but these errors were encountered: