-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve galaxy_transform.py #48
Conversation
If the value of "dependencies" is empty, it fails in ansible-generator with "AttributeError: 'NoneType' object has no attribute 'items'".
b6efdc7
to
5c2504a
Compare
Why is this needed? If the value was empty, wouldn't even the original file before the transform fail in the same way? |
Maybe the key is there for a placeholder? >> @richm? |
I have no idea. Not sure if it is required for Galaxy or Automation Hub upload. |
@nhosoi what is the problem you are trying to fix - what is the problematic input file? |
At least, Automation Hub upload does not require the field Do you happen to know how the galaxy.yml file was generated?
|
Well, I thought we don't want to touch a file already being used by someone. It may introduce some unknown error. But if it's not, I have no objection to modify
Not fully understood yet, but for galaxy.yml, it is transformed to MANIFEST.json. |
Are you trying to fix some problem? Apparently yes, so how to reproduce it? I have not understood it from the original description, sorry. You say "It fails". What fails? galaxy_transform.py fails?
And what is it, |
Sorry, I see that the reproducer was mentioned in #46 (comment) |
@pcahyna, here's more complete snippet. If we don't have the empty value, we don't get the Traceback.
|
I figured out that you are using Yes, I can reproduce your problem now, but IMO exactly the same problem would happen on Fedora with the unmodified galaxy.yml, so please do not paper over the problem by changing the innocent conversion tool. |
Sorry for my poor explanation and setting a wrong target... Closing this pr now. @richm, is it ok to remove the empty dependencies from galaxy.yml in this repo? |
Shown by a Fedora build: http://coprbe.devel.redhat.com/results/pcahyna/rhel-system-roles-collections/fedora-33-x86_64/00062989-linux-system-roles/builder-live.log.gz |
If it is not needed by Galaxy import or Automation Hub import, then yes, you can remove it. |
According to https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html#collections-galaxy-meta, this key is not among the required ones. |
If the value of "dependencies" is empty, it fails in ansible-generator
with "AttributeError: 'NoneType' object has no attribute 'items'".