Galaxy: Many of my roles had their names changed after importing them today

Created on 26 May 2020  Â·  11Comments  Â·  Source: ansible/galaxy

Bug Report

SUMMARY

Today I edited all my Galaxy roles and made sure they _all_ had role_name added to the Galaxy meta info in meta/main.yml.

Update: It looks like _all_ my older roles, regardless of whether a role_name is given, are having their names changed from - to _, and I'm getting a lot of broken builds as Galaxy isn't serving any kind of redirect :(

Many of my older roles had dashes in their names (e.g. https://galaxy.ansible.com/geerlingguy/apache-php-fpm). I set the name like role_name: apache-php-fpm and pushed a commit to GitHub.

Today all those older roles that have had dashes in their names were converted to underscores, so the role is now at https://galaxy.ansible.com/geerlingguy/apache_php_fpm — however, I have a _lot_ of playbooks and content that pulls from the roles at the original name (geerlingguy.apache-php-fpm), and I think there are a lot of other people that do, too...

Is there a way we can get Galaxy to preserve the old names for these roles, or did I just break half my role user's playbooks?

List of affected roles:

I stopped the builds for the following roles before they hit the webhook; I'm working on reverting the role_name setting for all of these (as well as those above) until it's possible to set that without making the role change names on Galaxy:

STEPS TO REPRODUCE
EXPECTED RESULTS

The role would still have the same name, apache-php-fpm

ACTUAL RESULTS

The role name on galaxy changed, and is now apache_php_fpm. All the old role URLs are 404s now, and installs are failing from ansible-galaxy CLI and requirements files.

$ ansible-galaxy install geerlingguy.apache-php-fpm
- downloading role 'apache-php-fpm', owned by geerlingguy
[WARNING]: - geerlingguy.apache-php-fpm was NOT installed successfully: - sorry, geerlingguy.apache-php-fpm was not
found on https://galaxy.ansible.com/api/.
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.

Most helpful comment

We're working on rolling back the importer changes and fixing the broken roles.

All 11 comments

I just rolled back the role_name setting on all my roles with dashes in their names. I'd still like to be able to add it at some point, but if it's a 'wontfix' that's understandable. I just wanted to help with something I see in email/DMs every week or two, where people get confused by how Ansible Galaxy's role importer works with my older roles where they get a different experience with their own (and don't see role_name in my roles and get confused as to how my roles are importing with a different name than the repo).

cc @newswangerd, @cutwater - it looks like the roles that were affected before I could do the revert were:

geerlingguy.apache-php-fpm
geerlingguy.aws-inspector
geerlingguy.collectd-signalfx
geerlingguy.drupal-console
geerlingguy.elasticsearch-curator
geerlingguy.github-users
geerlingguy.munin-node

@cutwater - I just checked, and now all these other roles are broken:

geerlingguy.packer-debian
geerlingguy.php-memcached
geerlingguy.php-mysql
geerlingguy.php-pear
geerlingguy.php-pecl
geerlingguy.php-pgsql
geerlingguy.php-redis
geerlingguy.php-tideways
geerlingguy.php-versions
geerlingguy.php-xdebug
geerlingguy.php-xhprof
geerlingguy.raspberry-pi
geerlingguy.repo-dotdeb
geerlingguy.repo-epel
geerlingguy.repo-puias
geerlingguy.repo-remi
geerlingguy.ssh-chroot-jail

Sigh... it seems like maybe a change to the role importer forced the underscores no matter what—these roles don't have the role_name defined.

This isn't helpful as such, but this (or almost this) happened before, and was supposed to be related to this change.

I've still got one old role with dashes in the role_name that hasn't been changed (updated ~8 weeks ago), and at least one (which nobody uses but me :grin: did get its name changed at some point).

@geerlingguy

Many of our automatic deployments use the repo-epel role. They all started failing as of now. Should we hold off on renaming from repo-epel to repo_epel for now?

@ctorgalson - FYI it seems there may have been an update to the role importer mechanism over the weekend... which is why things blew up a bit today.

@plemelin - I do not intend to change the names of any of my roles unless forced to do so—I'm trying to get them to be back at their old locations (thus this bug report).

We're working on rolling back the importer changes and fixing the broken roles.

Test builds are now passing, it looks like all the old names are working correctly now: https://travis-ci.org/github/geerlingguy/ansible-role-php/builds/691345980

@awcrosby can you look into what happened with the importer migration?

galaxy-importer only handles collection importing, so it does not affect role importing.

I'm not sure if this is anything new or not... it looks like we started renaming the role based on dashes to underscores a while back: https://github.com/ansible/galaxy/commit/eaa44d4a8a0541d0fa8d621d85aaa59701c4177e#diff-ad92af2f715e3fbd2332d12af824a4dfR260

Think we got this sorted out. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chouseknecht picture chouseknecht  Â·  3Comments

gustavomcarmo picture gustavomcarmo  Â·  7Comments

marcossegovia picture marcossegovia  Â·  6Comments

cfawcett82 picture cfawcett82  Â·  4Comments

robertdebock picture robertdebock  Â·  7Comments