ansible / galaxy

Legacy Galaxy still available as read-only on https://old-galaxy.ansible.com - looking for the new galaxy -> https://github.com/ansible/galaxy_ng
Apache License 2.0
856 stars 331 forks source link

Collection seems to be published (HTTP Code: 400, Message: Artifact already exists Code: invalid), but not accessible in the UI or via 'collection install' #3282

Closed drew1kun closed 1 year ago

drew1kun commented 1 year ago

Bug Report

SUMMARY

I have published the initial version 1.0.0 of my SSH collection and my account does not show the collection under my namespace

STEPS TO REPRODUCE

Trying to publish the same version again:

❯ ansible-galaxy collection publish drew1kun-ssh-1.0.0.tar.gz
Publishing collection artifact '/Users/drew/Library/CloudStorage/Dropbox/Code/github/ansible/ansible-collections/ansible-collection-ssh/drew1kun-ssh-1.0.0.tar.gz' to release_galaxy https://galaxy.ansible.com/api/
ERROR! Error when publishing collection to release_galaxy (https://galaxy.ansible.com/api/) (HTTP Code: 400, Message: Artifact already exists Code: invalid)

Trying to install the collection:

❯ ansible-galaxy collection install drew1kun.ssh

Starting galaxy collection install process
Process install dependency map
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* drew1kun.ssh:* (direct request)
EXPECTED RESULTS

The collection is visible in the UI under my namespace (so I could delete it and reupload):

https://galaxy.ansible.com/ui/namespaces/drew1kun/

The collection is supposed to be accessible on:

https://galaxy.ansible.com/ui/namespaces/drew1kun/ssh/

ACTUAL RESULTS

Other collections, that were published before Galaxy NG release are visible, but not the one I pushed tonight: https://galaxy.ansible.com/ui/namespaces/drew1kun/

404 is returned despite the API returning (HTTP Code: 400, Message: Artifact already exists Code: invalid) when trying to publish the same version that has been pushed previously:

https://galaxy.ansible.com/ui/namespaces/drew1kun/ssh/

Denney-tech commented 1 year ago

I have this same problem on a standalone instance of Galaxy_NG 4.8.1. There appears to be an artifact in my S3 bucket after initially uploading a collection to the api, but then nothing appears in the UI and there is a 400 error that the artifact already exists with subsequent uploads.

Edit: After further investigation, the collection I was looking for was in the staging repo waiting for approval. However, while troubleshooting I had deleted the namespace that the collection belonged to without approving the upload. Deleting the namespace did not delete the artifact, and recreating the namespace did not associate the artifact as pending approval. Without any method to delete the artifact (that I'm aware of), I had to completely redeploy Galaxy NG to return to a normal state.

thedoubl3j commented 1 year ago

hey @drew1kun can you open an issue on https://forum.ansible.com/c/help/6/none with the galaxy-ng tag? that is where active triage is done. this repository will be archived soon once a new namespace request process is selected.

drew1kun commented 1 year ago

Hi @thedoubl3j Thank you very much for the insight. I will move the issue there. Sorry, I did not know this git repo will be inactive soon. Thanks!

thedoubl3j commented 1 year ago

@drew1kun that wasn't directed at you per se. currently this repo's issues are used to track and open requests for new namespace requests, once we get a new way of tracking things like that, this repo will be archived, as will its issues. so just want to make sure we don't lose your issue is all ;)

drew1kun commented 1 year ago

Got it. Thank you for your help

drew1kun commented 1 year ago

posted the issue https://forum.ansible.com/t/collection-seems-to-be-published-http-code-400-message-artifact-already-exists-code-invalid-but-not-accessible-in-the-ui-or-via-collection-install/2252 but no answer so far (