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

CI: update Ubuntu and Perl versions #1305

Merged

Conversation

marc-vanderwal
Copy link
Contributor

@marc-vanderwal marc-vanderwal commented Nov 15, 2023

Purpose

This PR updates the versions of Ubuntu and Perl to use in Github actions.

Context

Discussion during work group meeting.

Changes

  • Use Ubuntu 22.04 instead of 20.04;
  • Test against Perl 5.36, 5.30 and 5.26 instead of 5.30, 5.26 and 5.16;
  • Reformat PO files according to newer version of gettext provided by Ubuntu 22.04.

How to test this PR

The Github Action should succeed.

The CI pipeline was still being run on Ubuntu 20.04. Update it to the
latest LTS version, 22.04.

In the same vein, move to more recent versions of Perl.
@marc-vanderwal marc-vanderwal marked this pull request as draft November 16, 2023 06:32
Add more diagnostics of why the “PO files are tidy” fails by means of a
git diff.
@marc-vanderwal
Copy link
Contributor Author

CI fails because of a failing test in t/po-files.t. Upgrading Ubuntu from version 20.04 to 22.04 caused an upgrade of gettext from version 0.19.8.1-10build1 to version 0.21-4ubuntu4. The formatting applied by msgcat might have slightly changed.

@marc-vanderwal marc-vanderwal marked this pull request as ready for review November 16, 2023 07:04
@marc-vanderwal
Copy link
Contributor Author

Seems like I was correct. The new msgcat has a better line-breaking algorithm that avoids the awkward line breaks in places like sur une requête de type "PTR", where previously, the line was broken between PTR and the closing double quote. Now the line is broken between type and "PTR", which is much better. In order for CI to pass, I’m going to have to update the PO files to reflect msgcat’s new line-breaking algorithm.

Upgrading the OS used by Github Actions to run tests on PRs from
Ubuntu 20.04 to 22.04 caused an upgrade in the gettext package. However,
the msgcat tool uses a slightly different line-breaking algorithm that
now works correctly with words between double quotations marks.

In order to make our automated tests pass, we need to fix the offending
PO files ourselves. In the French translation, this commit also fixes
two typos in msgstrs already affected by line breaking changes.

It therefore seems that the code introduced by pull request zonemaster#1195 is
more fragile than one might think. This means that other users,
especially those who might want to install Zonemaster::Engine from CPAN,
have an increased risk of failing unit tests for something that will not
cause Zonemaster::Engine to malfunction.

It might be desirable to disable the PO file formatting tests by
default, and only run them on Github Actions, so that a user who
installs Zonemaster::Engine from CPAN will succeed even if they happen
to have a version of gettext different from the developers’ systems’.
@marc-vanderwal marc-vanderwal force-pushed the features/update-ci-os-version branch from 3039158 to 7f6495d Compare November 16, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants