Not being able to upload new versions of role - galaxy new feature or bug?

Hello,

Trust all is well and sincerely hope this is a bug… because this sure makes life painful at the moment.

So we’ve been using Galaxy roles for a good long time and we have our own namespace and several roles in there - life was indeed good until the new NG platform has come in. So basic question is where does one now go to upload a new role or a new version of an existing role? User Guide - Galaxy NG gives me info to import a role and upload a collection but nothing to update a role…

Would really appreciate any info on this - if this is indeed some new feature; how does one update any of the old roles or what is the plan to go forward?

Thanks

Cheers

“ansible-galaxy role import” does both initial imports and updates. If you “import” a role that already exists, the backend updates related fields from the repository’s current metadata and also checks for any new semver compliant tags to add as new versions to the role.

CLI based imports are all we support right now. I realize lots of people want the UI based imports but we just haven’t gotten there yet. It’s not that we don’t want to.

1 Like

Hi @tannerjc

Thankyou for that. If I’ve understood this right I don’t need to be going into the UI and publishing versions? Merely an import on the role is enough?

If the latter is the case I’m not seeing that happen at present. eg:
in Github we had 0.0.13 pushed out circa 5 hours ago; Galaxy has only the previous 0.0.12 there Galaxy NG

We’ve done a fair few imports in the last 5 hours on CI but just to be safe I’ve run one manually, which downloaded 0.0.12 ok and never triggered an update to 0.0.13 in Galaxy. I deleted the venv and also attempted to download 0.0.13 in the hope that would also trigger the pull, but that blew up with the error below

consensys.lighthouse was NOT installed successfully: - the specified version (0.0.13) of consensys.lighthouse was not found in the list of available versions ([{'id': 'bfb1a08f-78fb-429f-8cef-0eb2b757d9d3', 'name':
'0.0.1', 'version': '0.0.1', 'created': '2023-07-11T11:44:09.367311Z', 'modified': '2023-07-11T11:44:09 ........   {'id': '46d0a1b8-10e7-4e4b-8450-a666eac93acb', 'name': '0.0.12', 'version': '0.0.12', 'created': '2023-09-22T02:55:20.667041Z', 'modified':
'2023-09-22T02:55:20.667069Z', 'commit_date': '2023-09-21T22:54:39-04:00', 'commit_sha': 'efdfb729e0b5dd0bb3e3b33870bbcaa7a19b66d0', 'download_url': 'https://github.com/ConsenSys/ansible-role-lighthouse/archive/0.0.12.tar.gz'}]).

So am really not quite sure how I update a published role atm. Should I just set the src to pull from github directly? While this can be done for us, it’d probably affect all users of any consumers in the public

Appreciate you looking into this

Cheers

Installing a role does not trigger a re-import/update on the backend. You must call “ansible-galaxy role import” to inform the server to fetch the role from github and compute any new metadata or versions.

I’ve gone through the historical tasks in the new galaxy database and found no record of anyone besides myself attempting to import the consensys.lighthouse role or any derivative of it’s names and repository.

I went ahead and imported it for you, just to show that there are no problems …

# ansible-galaxy role import --token=<TOKEN> --role-name=lighthouse ConsenSys ansible-role-lighthouse
Successfully submitted import request 2053838145820334261713092366481714167
running
role imported successfully

The role’s page now shows 0.0.13 in the list of verisons.

It can also be installed.

[root@2bf297d2d404 /]# ansible-galaxy role install -p /tmp/roles consensys.lighthouse,0.0.13 
Starting galaxy role install process
- downloading role 'lighthouse', owned by consensys
- downloading role from https://github.com/ConsenSys/ansible-role-lighthouse/archive/0.0.13.tar.gz
- extracting consensys.lighthouse to /tmp/roles/consensys.lighthouse
- consensys.lighthouse (0.0.13) was installed successfully
[root@2bf297d2d404 /]#

Thankyou for that. Can this be added directly to the docs please?

Docs for the new system are hosted here.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.