galaxyproject / ansible-galaxy

An Ansible role for managing a Galaxy server
https://galaxy.ansible.com/galaxyproject/galaxy
57 stars 75 forks source link

disable galaxy config sorting #218

Open sanjaysrikakulam opened 1 month ago

sanjaysrikakulam commented 1 month ago

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.