question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lots of broken dependencies due to `role_name` changing hyphens to underscores

See original GitHub issue

Bug Report

SUMMARY

The new naming convention has broken a lot of linked repos which need to be reverted or we would like recommendation for a future proof naming convention.

STEPS TO REPRODUCE

Yesterday, we noticed with one of our recent roles stackhpc.beegfs that the ansible-role- part was not being omitted as it previously did each time Travis CI build job triggered a notification API. Then, we noticed that adding role_name: beegfs to meta/main.yml ensured that the ansible-role- part was omitting. We made the fatal assumption that this change affected all our other repos so as a result, charged ahead with adding this line to about 30+ roles currently available on our Ansible Galaxy repository. We came under the impression that this was a way to guarantee that this would secure their name. Then we noticed that the repositories with hyphens in have now converted to underscores.

The situation is that now we have lots of broken dependencies that affect almost all our other repositories. Is there a way to revert this change? At the moment, we have in total 26 repositories that previously had hyphens in that need to go back to their original state. Despited removing the role_name from meta/main.yml file, it appears that this does not restore the previous state.

EXPECTED RESULTS

Either: Restore former hyphenated names to 26+ repos under stackhpc organisation. Or: Recommend us a future proof naming scheme that is unlikely to change again in the near future as we observed in one of the issues that even the role_name variable is under discussions to be deprecated (https://github.com/ansible/galaxy/issues/1042, https://github.com/ansible/mazer/issues/62).

ACTUAL RESULTS

At the moment, there does not appear to be any way of going back as a lay user.

Sample import log for one of our roles showing the rename taking place irreversiable.

INFO Starting import: task_id=281479, repository=stackhpc/ansible-role-dell-powerconnect-switch
INFO Content search - Looking for file "apb.yml"
INFO Content search - Looking for top level role metadata file
WARNING [role] Missing 'dependencies' field in metadata.
INFO [role] Linting...
INFO [role] Linting OK.
INFO Updating repository name "dell-powerconnect-switch" -> "dell_powerconnect_switch"
INFO [ROLE: dell_powerconnect_switch] Created new Content instance: id=29348, content_type="role", name="dell_powerconnect_switch"
INFO [ROLE: dell_powerconnect_switch] Adding role metadata tags
INFO [ROLE: dell_powerconnect_switch] Adding role platforms
INFO Deleting Content instance: content_type=role, namespace=stackhpc-3269, name=dell-powerconnect-switch
INFO Updating repository versions...
Import completed

Many thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
luisicocommented, Oct 9, 2018

Late to the “party” (more of a nightmare!), but still wanted to express my opinion about the forced renames. Briefly, a major blow for the community as a whole a) without a logical reason (what does “support for multiple roles within a repository” have to do with dash vs underscore, or what ever users want to use); b) without proper planning (today use role_name, next day don’t, or may-be-yes-or-may-be-no). My 2cts

3reactions
markgoddardcommented, Sep 4, 2018

Thanks @chouseknecht - that (renaming _ to -) would get us out of a sticky situation for the time being. I trust that if we do not delete the role in Galaxy then imports will not trigger a rename?

Looking to the future, will there come a time when we need to change these names to use underscores? If so, it will be crucial to have a backwards compatible migration path that does not break users and CI/CD pipelines everywhere (not just ours).

IMO without the prefix magic, some solution will be required for setting the name of a role, role_name or otherwise.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Htaccess recursively replace underscores with hyphens
I'm trying to redirect all URLs with underscores to the same URL but with underscores replaced by hyphens.
Read more >
REDCap Change Log - Eastern Virginia Medical School
Major bug fix: When attempting to upgrade to REDCap 12.5.13 (Standard), the REDCap upgrade page would mistakenly redirect the user back to the...
Read more >
Changelog - Sphinx documentation
To re-add jQuery and underscore.js, you will need to copy jquery.js and underscore.js from the Sphinx repository to your static directory, ...
Read more >
IBM Informix Messages and Corrections
This 4GL runtime message tells where a program stopped due to an error. ... characters except underscores and, in IBM Informix Dynamic Server...
Read more >
Changes in Sphinx — Sphinx v1.0.8 documentation
#633: Allow footnotes in section headers in LaTeX output. #616: Allow keywords to be linked via intersphinx. #613: Allow Unicode characters in production...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found