blue-build / modules

BlueBuild standard modules used for building your Atomic Images
Apache License 2.0
26 stars 5 forks source link

Fonts module does nothing #371

Closed tecncr closed 7 hours ago

tecncr commented 13 hours ago

Starting from today, the fonts module does nothing when called by the BlueBuild CLI running on GitHub Actions

Logs from yesterday: https://github.com/tecncr/mcubi/actions/runs/12113778719/job/33769282879#step:2:3762

Logs from today: https://github.com/tecncr/mcubi/actions/runs/12151798629/job/33887044347#step:2:3747

Relevant recipe module: https://github.com/tecncr/mcubi/blob/main/recipes/common/fonts.yml

trevnels commented 13 hours ago

Seeing the same behavior with the following module config:

- type: fonts # install JetBrainsMono NF
  fonts:
    nerd-fonts:
      - JetBrainsMono

Yesterday: https://github.com/trevnels/adwaitium/actions/runs/12124368897/job/33801944488#step:2:1783 Today (also note that the action version was updated today): https://github.com/trevnels/adwaitium/actions/runs/12152939580/job/33890200635#step:2:3713

I also noticed that the fonts module was changed yesterday - could be a regression there?

xynydev commented 11 hours ago

That's unfortunate. It doesn't seem that there are any issues with your respective module configurations, so this is probably an issue with the module. This leads me to believe that this is either an issue stemming from the recent refactor PR here, or just an intermittent network problem. We'll have to investigate.

I find it likely that the issue is in this line: https://github.com/blue-build/modules/blob/c3532b7d303d6d9d22f478cf79df632af5634b84/modules/fonts/fonts.sh#L11

I should have time to investigate this later this week, but @fiftydinar may be available earlier.

fiftydinar commented 11 hours ago

I find it likely that the issue is in this line:

https://github.com/blue-build/modules/blob/c3532b7d303d6d9d22f478cf79df632af5634b84/modules/fonts/fonts.sh#L11

The weird thing is that it worked locally for me.

I'll try to correct the issue

fiftydinar commented 11 hours ago

I think that I fixed this, can someone give it a try?

https://github.com/blue-build/modules/commit/1e1cbd3c75641329336bb016306ae3cdd54c0309

tecncr commented 10 hours ago

Re-run logs: https://github.com/tecncr/mcubi/actions/runs/12155104881/job/33896003462#step:2:3671

Apparently, now we don't even have the Installation of google-fonts started and Installation of nerd-fonts started messages

I'm gonna try to build locally.

fiftydinar commented 9 hours ago

It works in my build:

https://github.com/fiftydinar/gidro-os/actions/runs/12155829854/job/33898189361#step:2:1477

I just added the module locally & used set -x to troubleshoot.

Here's how it looks like in logs normally without set -x (using module from BlueBuild, not locally)

https://github.com/fiftydinar/gidro-os/actions/runs/12155991393/job/33898685485#step:2:1781

I use latest Github action v1.7

bubuntux commented 8 hours ago

still does not work for me https://github.com/bubuntux/os/actions/runs/12156691398/job/33900892335#step:2:3903

fiftydinar commented 7 hours ago

It works in my build:

https://github.com/fiftydinar/gidro-os/actions/runs/12155829854/job/33898189361#step:2:1477

I just added the module locally & used set -x to troubleshoot.

Here's how it looks like in logs normally without set -x (using module from BlueBuild, not locally)

https://github.com/fiftydinar/gidro-os/actions/runs/12155991393/job/33898685485#step:2:1781

I use latest Github action v1.7

I made a mistake in testing, I used this wrong recipe format:

  - type: fonts
    nerd-fonts:
      - DejaVuSansMono
      - FiraCode
      - Hack
      - JetBrainsMono
      - SourceCodePro
    google-fonts:
      - Roboto
      - Open Sans

Instead of this:

  - type: fonts
    fonts:
      nerd-fonts:
        - DejaVuSansMono
        - FiraCode
        - Hack
        - JetBrainsMono
        - SourceCodePro
      google-fonts:
        - Roboto
        - Open Sans

So this should be finally fixed now. https://github.com/blue-build/modules/commit/7011469432649d4cc2e70346fb3b8eb53d6d4982

Sorry for the trouble I made.

bubuntux commented 7 hours ago

i think that may still have an issue, i think the module needs the trail so we need this https://github.com/blue-build/modules/pull/373 i tested this patch locally and seems to work

bubuntux commented 7 hours ago

proof https://github.com/bubuntux/os/actions/runs/12157679501/job/33903997356#step:2:3674

fiftydinar commented 7 hours ago

i think that may still have an issue, i think the module needs the trail so we need this #373 i tested this patch locally and seems to work

Hmm, why is trail needed?

I remember trail actually caused the issue in fonts module, URL contained it iirc, failing the builds (or it was maybe gschema-overrides module).

That's why we use readarray -t in get_json_array function since then.

bubuntux commented 7 hours ago

with the trail https://github.com/bubuntux/os/actions/runs/12157679501/job/33903997356#step:2:3674

bubuntux commented 7 hours ago

without the trail it tries to download this ... https://github.com/bubuntux/os/actions/runs/12157386181/job/33903067251#step:2:3740

bubuntux commented 7 hours ago

if we want to remove the trails we would need to adjust the scripts to download the fonts as well

fiftydinar commented 7 hours ago

i think that may still have an issue, i think the module needs the trail so we need this #373 i tested this patch locally and seems to work

Merged

fiftydinar commented 7 hours ago

if we want to remove the trails we would need to adjust the scripts to download the fonts as well

Scripts are already covered well in this part, so we should be good.

fiftydinar commented 7 hours ago

I'll close this issue as fixed, if issue is not fixed, please tell to reopen.

bubuntux commented 7 hours ago

i can confirm that rebuilding fixes the font issue now https://github.com/bubuntux/os/actions/runs/12157994341/job/33904964972#step:2:3874