Open siamaksade opened 6 years ago
@siamaksade
Not sure I follow the chain of events. I am able to reproduce the error, ValueError: No JSON object could be decoded
, by running the following:
ansible-galaxy -vvv import --role-name=openshift_nexus chouseknecht chouseknecht/ansible-openshift-nexus
But then, if I immediately run the following, it works just fine:
ansible-galaxy -vvv import --role-name=openshift_nexus chouseknecht ansible-openshift-nexus
I do see that you have the role already imported as openshift_sonatype_nexus
, and so I wonder if that's the issue.
My suggestion would be to delete the role from Galaxy, and import it from scratch.
My take away from experimenting with POST requests to api/v1/imports
is that we need to verify the requested github_user
and github_repo
with the GitHub API, and when not valid, return an error that the client can process.
I imported it under a different name since it kept failing with openshift_nexus
as the role name. I couldn't delete it since it kept saying such a role doesn't exist. It seemed like it is left in an inconsistent state that delete says it doesn't exist, and import uses the same incorrect github repo as the first import command no matter what the consequent commands specify as the github repo.
Similar issue on our end today:
30-Jul-2018 15:21:07 - downloading role 'logrotate', owned by ssilab
30-Jul-2018 15:21:07 https://galaxy.ansible.com/api/v1/roles/?owner__username=ssilab&name=logrotate
30-Jul-2018 15:21:07 Unexpected Exception: No JSON object could be decoded
When i actually go to the URL mentioned i get the real error:
Request URL: https://galaxy.ansible.com/api/v1/roles/?owner__username=ssilab&name=logrotate
Request Method: GET
Status Code: 500 Internal Server Error
Similar issue too. The website also seems broken
If a failed attempt exists for a sepcific role name, consequent imports keep using the failed attempt options and keep failing.
I had imported a role with the wrong syntax (github user an repo) which of course failed:
Correcting the syntax does not help now and keeps failing with the same error as long as the role name is the same as the failed attemp, openshift_nexus in this case:
If the role name is changed to something else e.g. ocp_nexus instead of openshift_nexus, then the import would succeed: