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

Fonts module does nothing #371

Closed
tecncr opened this issue Dec 4, 2024 · 18 comments
Closed

Fonts module does nothing #371

tecncr opened this issue Dec 4, 2024 · 18 comments
Labels
priority: critical Should be done as soon as possible state: approved Approved to proceed. type: bug Something isn't working.

Comments

@tecncr
Copy link

tecncr commented Dec 4, 2024

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
Copy link

trevnels commented Dec 4, 2024

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 xynydev added type: bug Something isn't working. state: approved Approved to proceed. priority: critical Should be done as soon as possible labels Dec 4, 2024
@xynydev
Copy link
Member

xynydev commented Dec 4, 2024

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:

FONTS=("$(echo "${1}" | jq -c -r --arg ARRAY_NAME "${ARRAY_NAME}" 'try .[$ARRAY_NAME][]')")

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

@fiftydinar
Copy link
Collaborator

fiftydinar commented Dec 4, 2024

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

FONTS=("$(echo "${1}" | jq -c -r --arg ARRAY_NAME "${ARRAY_NAME}" 'try .[$ARRAY_NAME][]')")

The weird thing is that it worked locally for me.

I'll try to correct the issue

@fiftydinar
Copy link
Collaborator

fiftydinar commented Dec 4, 2024

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

1e1cbd3

@tecncr
Copy link
Author

tecncr commented Dec 4, 2024

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
Copy link
Collaborator

fiftydinar commented Dec 4, 2024

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
Copy link
Contributor

bubuntux commented Dec 4, 2024

@fiftydinar
Copy link
Collaborator

fiftydinar commented Dec 4, 2024

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.
7011469

Sorry for the trouble I made.

@bubuntux
Copy link
Contributor

bubuntux commented Dec 4, 2024

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

@bubuntux
Copy link
Contributor

bubuntux commented Dec 4, 2024

@fiftydinar
Copy link
Collaborator

fiftydinar commented Dec 4, 2024

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
Copy link
Contributor

bubuntux commented Dec 4, 2024

@bubuntux
Copy link
Contributor

bubuntux commented Dec 4, 2024

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

@bubuntux
Copy link
Contributor

bubuntux commented Dec 4, 2024

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

@fiftydinar
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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

@bubuntux
Copy link
Contributor

bubuntux commented Dec 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: critical Should be done as soon as possible state: approved Approved to proceed. type: bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

5 participants