Skip to content
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

Role name has changed #48

Closed
triwats opened this issue Mar 18, 2020 · 12 comments · Fixed by #50
Closed

Role name has changed #48

triwats opened this issue Mar 18, 2020 · 12 comments · Fixed by #50

Comments

@triwats
Copy link
Contributor

triwats commented Mar 18, 2020

Hey, thanks for the role first and foremost, and the improvements over the last few years!

I've tried to run a playbook today that has this as a dependancy, however it is giving me a 404 on the role, which seems consistent.

Error:

[WARNING]: - stefangweichinger.rclone was NOT installed successfully: - sorry, stefangweichinger.rclone was not found on
https://galaxy.ansible.com/api/

Stated link within the README specifies this url, however this does not seem to work either.

I believe this is caused because it has been changed on within the Ansible Galaxy Metadata - is there a sane reason to do this? I do not mind refactoring, just seems to be a bit inconsistent.

Thanks!

@triwats triwats changed the title Role Name has changed. Role name has changed Mar 18, 2020
@triwats
Copy link
Contributor Author

triwats commented Mar 18, 2020

On further inspection, is this related to #27? If so, is it possible to get some more context on this?

@stefangweichinger
Copy link
Owner

Thanks for reporting. I have to admit that I never fully understood the "link" to galaxy, that also might explain why the automatic import to galaxy fails often. I will have a closer look asap.

@stefangweichinger
Copy link
Owner

To be honest, I don't exactly know how to start here ;-)

ansible-galaxy install stefangweichinger.ansible_rclone works for me.

Your point is valid, that needs to be corrected in the README, will do asap.

You tried stefangweichinger.rclone ? Yes, that name isn't valid anymore.
Yes, maybe inconsistent, but changing it back would even make it worse, right?

Do you think correcting README is fixing the issue?
thanks, Stefan

@stefangweichinger
Copy link
Owner

edited README to correct the role name, and also fixed the badges (role id changed as well)

@triwats
Copy link
Contributor Author

triwats commented Mar 20, 2020

Hey Stefan!

It works for me with ansible_rclone, but I do think that it is implicit as a name too, since it's already within Ansible Galaxy. I don't see a quick and easy fix for this without causing issues for some users. I suppose you could see if you can get some metrics on role usage out of galaxy to see if more people are using the old stefangweichinger.rclone or stefangweichinger.ansible_rclone.

Two other thoughts:

  • I think adding something in the README regarding the name change might be good
  • Perhaps we could look at renaming the repository? Here it is named with a -, not a _.

Stuff like this is always frustrating in my experience, I hope that is constructive! Let me know if you want me to add some documentation regarding the name change within the README.

@triwats
Copy link
Contributor Author

triwats commented Mar 20, 2020

Having read the documentation surrounding galaxy, I think this is due to a change within Galaxy itself:

role_name

    Optional. Use to override the name of the role.

    In the past, Galaxy would apply a regex expression to the GitHub repository name and automatically remove ‘ansible-‘ and ‘ansible-role-‘. For example, if your repository name was ‘ansible-role-apache’, the role name would translate to ‘apache’. Galaxy no longer does this automatically. Instead, use the role_name setting to tell Galaxy what the role name should be.

    If no value is provided, then the role name will match the repository name, with a couple of exceptions, including: converting the name to all lowercase, and replacing any ‘-‘ or ‘.’ characters with ‘_’.

The value of role_name will be converted to lowercase, and ‘-‘ and ‘.’ will be translated to ‘_’.

This explains:

  1. Why the rolename is percieved as having changed, when infact Galaxy now works different. In the past, ansible-rclone would be listed on Galaxy as simply rclone
  2. Why the repository name is ansible-rclone and the role name is `ansible_rclone

I think metric data would still be interesting to look at but I am not sure if it is available. The fix in this case from what I can gather is to add name: rclone to galaxy_info in meta/main.yml. However, this I presume would leave newer users having to the same name error as before.

@stefangweichinger
Copy link
Owner

thanks @triwats for research and feedback :-)

I always vote for getting things right ... even if it means to break things at least temporary.
It would be helpful to somehow inform the users but that isn't possible.

Maybe we start with that suggested block in the README and announce a planned renaming at least? Then in a second step actually add that variable to the meta-information. And then re-import?

@triwats
Copy link
Contributor Author

triwats commented Mar 21, 2020

Hey @stefangweichinger no worries, I'm learning too!

I think that's a good step yes, it makes sense to try and communicate it through a README and I do think it makes sense to change the role name moving forward. I was wondering if it makes to create a new repository, but I don't see a neat way of doing that without messing up history. Therefore this seems to be the cleanest approach.

@stefangweichinger
Copy link
Owner

@triwats I am quite busy so this has to wait a bit. Feel free to suggest a README paragraph or so ;-)

@stefangweichinger
Copy link
Owner

I am confused again: start page still doesn't find the role on galaxy.
I will look closer in the next days and decide.

@triwats
Copy link
Contributor Author

triwats commented May 5, 2020

Hi again @stefangweichinger - I did a little digging on this and it seems that the ID has changed. Perhaps they have done a re-index at some point, changing IDs?

I got the roleID via ansible-galaxy:

ansible-galaxy info stefangweichinger.ansible_rclone | grep -E 'id: [0-9]' | awk {'print $2'}

This is now fixed and working on my fork and included in #50

Hope this helps!

@stefangweichinger
Copy link
Owner

@triwats nice, thanks.
Travis tests look good so far, will merge it and close here.
Hopefully things calm down around IDs and names ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants