Skip to content

Conversation

@MarioZZJ
Copy link

Description

Fix licensed gem installation failure on ubuntu-latest (probably Ubuntu 24.04) runner. The issue was discovered during recent GitHub Actions ubuntu-latest image upgrade (announcement), where nokogiri compilation fails due to missing xzcat.

Problem

When running metrics action on Ubuntu 24.04 (new ubuntu-latest), licensed gem installation failed with:

ERROR: Failed to build gem native extension.
...
/var/lib/gems/3.1.0/gems/mini_portile2-2.8.8/lib/mini_portile2/mini_portile.rb:557:in `xzcat_exe': xzcat not found (RuntimeError)

Solution

Add xz-utils package to Dockerfile dependencies to provide xzcat command required by nokogiri compilation.

Testing

Successfully tested with action running on ubuntu-latest (workflow run)

Notes

Since GitHub's ubuntu-latest upgrade is rolling out until January 17th, 2025 (see announcement):

  • This PR could be merged after majority of users migrate to Ubuntu 24.04
  • Or affected users can temporarily use runs-on: ubuntu-22.04 as workaround

The licensed gem installation fails due to missing `xzcat` command during `nokogiri` compilation.
Adding `xz-utils` package resolves this dependency issue.
@MarioZZJ
Copy link
Author

@lowlighter Hi, I noticed this issue during recent GitHub Actions ubuntu-latest upgrade process.

Would you mind reviewing this PR?

SN-Koarashi added a commit to SN-Koarashi/metrics that referenced this pull request Dec 28, 2024
Yomisana added a commit to Yomisana/metrics that referenced this pull request Dec 28, 2024
fix: add `xz-utils` dependencies, actions linux system not had this dependencies

refer to lowlighter#1677 PR
MrMasrozYTLIVE added a commit to MrMasrozYTLIVE/metrics that referenced this pull request Dec 29, 2024
Add xz-utils as dependencies lowlighter#1677
fix: add `xz-utils` dependencies, actions linux system not had this dependencies

refer to lowlighter#1677 PR
BalaM314 added a commit to BalaM314/BalaM314 that referenced this pull request Jan 2, 2025
@tr7zw
Copy link

tr7zw commented Jan 9, 2025

Might this be related to repository stats no longer seeming to work for the past few days?
grafik

@MrMasrozYTLIVE
Copy link

Might this be related to repository stats no longer seeming to work for the past few days? grafik

Hey tr7zw, yeah that's the reason. It shouldve failed all builds for you for last few days

@tr7zw
Copy link

tr7zw commented Jan 9, 2025

I had the first failing one today (https://github.com/tr7zw/tr7zw/actions/runs/12682127087/attempts/1 but it worked on a second retry), outside of that I just noticed that all repo stat values vanish from time to time (tr7zw/tr7zw@2482f9a#diff-15c77d2bbedf6bd69a53f23e8705a32acfeeb9a45ca324f78e8f385924ab3f29L188), might depend on which ubuntu runner it happens to use.

@github-actions
Copy link
Contributor

This pull request seems to be inactive and will be automatically closed in a few days if it remains without any activity.

@MrMasrozYTLIVE
Copy link

bump

@github-actions
Copy link
Contributor

This pull request seems to be inactive and will be automatically closed in a few days if it remains without any activity.

@lishaduck
Copy link

bump

@github-actions
Copy link
Contributor

This pull request seems to be inactive and will be automatically closed in a few days if it remains without any activity.

@lishaduck
Copy link

Bump

Copy link

@oddstr13 oddstr13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it strange that this would be tied to the runner, as it is adding an additional dependency in the docker container (which is based on the node base image).
I think it more likely that the node baseimage changed to not include it, or that it is a new dependency in the licensed gem.

Either way, this is a required change to make the action buildable, and I came to the exact same solution myself (to the byte) before starting to look at what PRs where open.

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.

5 participants