fontist / fontist

Install openly-licensed fonts on Windows, Linux and Mac!
BSD 2-Clause "Simplified" License
18 stars 4 forks source link

URGENT: Font required for metanorma-bipm is invalid #382

Closed opoudjis closed 1 month ago

opoudjis commented 1 month ago

https://github.com/metanorma/metanorma-cli/actions/runs/10244795419/job/28340978101

Attempting to compile the files in mn-samples-bipm is triggering the following error:

/Users/runner/work/metanorma-cli/metanorma-cli/samples/vendor/bundle/ruby/3.1.0/gems/fontist-1.21.1/lib/fontist/resources/archive_resource.rb:32:in `download_file': 
Invalid URL: https://www.gust.org.pl/projects/e-foundry/tex-gyre/whole/tg2_501otf.zip. Error: #<Down::ServerError: 502 Bad Gateway>. (Fontist::Errors::InvalidResourceError)

The fonts BIPM accesses are:

      "Arial" => nil,
      "Times New Roman" => nil,
      "Work Sans" => nil,
      "Work Sans Black" => nil,
      "Work Sans ExtraBold" => nil,
      "Work Sans ExtraLight" => nil,
      "Work Sans Light" => nil,
      "Work Sans Medium" => nil,
      "Work Sans SemiBold" => nil,
      "Work Sans Thin" => nil,
      "STIX Two Math" => nil,
      "Source Han Sans" => nil,
      "Source Han Sans Normal" => nil,
      "TeXGyreChorus" => nil,

Presumably this is TeXGyreChorus. https://www.gust.org.pl/projects/e-foundry/tex-gyre/whole/tg2_501otf.zip is indeed inaccessible.

opoudjis commented 1 month ago

This is blocking Metanorma release, and must be resolved as a matter of urgency.

opoudjis commented 1 month ago

To prevent recurrence of this on test day: @CAMOBAP would it be possible to set up a cron job that checks all the URLs Metanorma invokes in Fontist daily? The fonts are listed in https://github.com/fontist/fontist/wiki/Font-usage-in-Metanorma

CAMOBAP commented 1 month ago

@opoudjis what is your vision about the implementation of this check? Should it be done in a single place, or can be 'distributed' across metanorma-* maybe as an unit test?

@alexeymorozov AFAIR some metanorma testing was don't on fontist side maybe you have also some vision/suggestions where/how implement testing of release-critical font formulas?

opoudjis commented 1 month ago

I think it's a weekly check, in one place, of just the fonts that Metanorma accesses, to ensure that if any of those fonts have become unavailable, @alexeymorozov is notified. It can just be a ping of the URLs involved. Of course, Alexei can say what works best for him, but now that more repos are must-pass for Metanorma, this is going to become more of an issue.

CAMOBAP commented 1 month ago

It can just be a ping of the URLs involved

to ping them we will have to maintain a list of those URLs, they are already presented in the formulas, so it is better test the formulas installation itself because there is possible not only 404 but corrupted files too.

On the other side list of fonts used by metanorma- are in `Metanorma::::Processor.fonts_manifestmethods. So we can write a simple tool thatrequire metanorma/*/processorand feedFontist::CLIwithfonts_manifest` map

If put it on metanormaorg's side, I think better place is metanorma-cli otherwise fontist repo

@alexeymorozov any feedback from your side is appreciated

andrew2net commented 1 month ago

Relaton also has the error here https://github.com/relaton/relaton-data-bipm/actions/runs/10250502470/job/28356370174#step:7:575

ronaldtse commented 1 month ago

It should be done on the Metanorma side indeed.

@andrew2net but Relaton does not depend on Fontist at all, maybe find out why and remove that dependency?

CAMOBAP commented 1 month ago

It should be done on the Metanorma side indeed.

@andrew2net but Relaton does not depend on Fontist at all, maybe find out why and remove that dependency?

Ok, I will implement dediсated workflow on metanorma-сli repo https://github.com/metanorma/metanorma-cli/issues/336

andrew2net commented 1 month ago

@andrew2net but Relaton does not depend on Fontist at all, maybe find out why and remove that dependency?

@ronaldtse yes, it doesn't, but matanorma is used in the relation-data-bimp GHA

opoudjis commented 1 month ago

If BIPM is the only flavour that fails release now, because of this, I will force release...

opoudjis commented 1 month ago

This issue is now also blocking mn-samples-jcgm, now that its plurimath bug has been resolved:

D:/a/metanorma-cli/metanorma-cli/samples/vendor/bundle/ruby/3.1.0/gems/fontist-1.21.1/lib/fontist/resources/archive_resource.rb:32:in `download_file': Invalid URL: https://www.gust.org.pl/projects/e-foundry/tex-gyre/whole/tg2_501otf.zip. Error: #<Down::ServerError: 502 Bad Gateway>. (Fontist::Errors::InvalidResourceError)

Which is to be expected, JCGM uses the same BIPM gem.

I am going to force release, but this continues to need to be addressed.

CAMOBAP commented 1 month ago

https://web.archive.org/web/20210213120450/https://www.gust.org.pl/projects/e-foundry/tex-gyre/whole/tg2_501otf.zip - looks working I will try to update formula ASAP

CAMOBAP commented 1 month ago

Formula fixed, retrying failed jobs

CAMOBAP commented 1 month ago

https://github.com/metanorma/metanorma-cli/pull/337 - ready for review