ansible-galaxy
ansible-galaxy copied to clipboard
disable galaxy config sorting
In EU @bgruening observed that the brand_by_host gets sorted in the final configuration when written to disk (galaxy.yml file). As a result of this sorting, the usegalaxy.eu: Europe comes before the subdomain virology.usegalaxy.eu: Virology, which leads to the misbranding of the subdomain https://virology.usegalaxy.eu. This subdomain contains the brand Europe instead of Virology.
Example (final config from galaxy.yml):
brand_by_host:
africa.usegalaxy.eu: Africa
annotation.usegalaxy.eu: Genome Annotation
...
...
...
usegalaxy.eu: Europe
virology.usegalaxy.eu: Virology
By default, sort_keys is set to true in the to_nice_yaml function in the galaxy.yml.j2 template. Sorting the brand_by_host in Galaxy config affects the branding of the subdomains. Therefore, this PR disables the default sort_keys.
@natefoo, I am unsure whether the default sorting is needed for anything in Galaxy configuration. Please correct me if this is not the case.
ping @natefoo
I don't think this is the right solution. This unsets the default sort for all galaxy config properties. We don't view the generated config often, but when we do, it helps when those options are sorted. This is not a full -1: I'm OK with this if this is the only reasonable fix. @bgruening is this still an issue? (checking because it's been a year; we should've reviewed this a long time ago - sorry!)
@jdavcs its not solved, you see it here: https://virology.usegalaxy.eu/
If disabling sorting does not break idempotency this is probably ok, although I would prefer this would be configurable.
IMO the real solution is for Galaxy to read these config options correctly. It should not be matching usegalaxy.eu for virology.usegalaxy.eu. There is an issue for this at https://github.com/galaxyproject/galaxy/issues/17664.