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

distro_mapping_links fails with UTF-8 distro name #1559

Open
dfandrich opened this issue Mar 30, 2023 · 3 comments
Open

distro_mapping_links fails with UTF-8 distro name #1559

dfandrich opened this issue Mar 30, 2023 · 3 comments

Comments

@dfandrich
Copy link
Contributor

An attempt was made to add a distro mapping for Adélie Linux in https://pagure.io/fedora-infra/ansible/pull-request/1349 that was reverted because it caused Anitya to fail. A subsequent attempt to add other distro mappings without the Adélie Linux entry succeeded (https://pagure.io/fedora-infra/ansible/pull-request/1352) so it is likely that the UTF-8 in the anitya.toml Ansible file was the source of the problem.

Running the server locally with a manually-created anitya.toml file including Adélie Linux worked completely fine, so I'm guessing the issue may be with Ansible somehow corrupting the file before it ends up in /etc/anitya/anitya.toml on the server. I've opened the issue here because it specifically affects Anitya and I can't prove it relates to Ansible.

@Zlopez
Copy link
Contributor

Zlopez commented Mar 30, 2023

When I checked the raw output of the anitya.toml for the mentioned commit it contained really strange characters Adélie Linux. I don't think this is issue anywhere in Anitya, the toml module couldn't just parse that.

@dfandrich
Copy link
Contributor Author

If you go to that "commit" in in the broweser, the server is providing the false header line content-type: text/plain; charset=ISO-8859-1 so the browser is displaying the file incorrectly. If you download the file and view it as UTF-8, it's correct.

I confirmed that Anitya handles UTF-8 fine when I tried it locally, which is why I think the file is being corrupted elsewhere.

@Zlopez
Copy link
Contributor

Zlopez commented Mar 30, 2023

Maybe jinja which is processing the templates in ansible is the issue here.

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

No branches or pull requests

2 participants