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

Migrated this issue from github galaxy repo (with the template) as suggested:
OP: Collection seems to be published (HTTP Code: 400, Message: Artifact already exists Code: invalid), but not accessible in the UI or via 'collection install' · Issue #3282 · ansible/galaxy · GitHub

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/

ACTUAL RESULTS

Other collections, that were published before Galaxy NG release are visible, but not the one I pushed tonight.

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.

1 Like

I’m in the same situation. I have created a collection, but unfortunately specified a license file and set the license directives which are mutually exclusive. The ansible-galaxy publish command failed. I have fixed the error and I get now the same error message without a) seeing the artifacts in the Ansible Galaxy and b) having a way to delete that artifact.

Any hints on how to get me unblocked would be highly appreciated.

1 Like

That sucks, I have created the issue on github, but they redirected me here, and I have opened this thread… No help so far((

I remember also having seen that in the past; back then I think related to some collection upload problems with Zuul (maybe the upload was incomplete and the resulting tarfile received by Galaxy didn’t contain some files?).

I think @tannerjc mentioned somewhere that he’s trying to fix it, but I don’t remember where and when and what was the latest status on it.

I found two issues on AAH’s Jira which might be related:

Looks like the community can’t add plugins anymore. Shouldn’t this get a high priority, no?

Hi folks,

As you may have noticed in the issues, we have some challenges at times with failed uploads leaving the system in a “half” state where the artifact is known to pulp, but didn’t actually make it into the “published” repository where it would be available to download. Unfortunately we also have challenges with cleanup of unused|orphaned artifacts and we’ve been working with the pulp team to try to rememedy that.

The current workaround for this situation is the increment the version of the collections and try to upload again.

@mfuhrmann I’m not sure why you’d say that “plugins” can’t be added anymore. I see multiple successful collection uploads today. The issues being described here are not happening in every case.

1 Like

Actually, the workaround finally worked for me! Patience rules))
Thanks!