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

fix(actions): try to recover if just fails to install #2106

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

ledif
Copy link
Contributor

@ledif ledif commented Jan 4, 2025

I have noticed an increase in workflow failures due to flaky errors with installing just. For example, in the past few days, the following jobs to build images have failed:

The command curl -L https://api.github.com/repos/casey/just/releases/latest | jq -r '.tag_name' is sometimes returning "null" instead of an actual version, but it's difficult to tell if the curl call is failing or if it's returning a payload that is being parsed incorrectly.

In either case, adding --retry to curl and if it's still null, hardcoding a known good version should do the trick for now.

@ledif ledif requested a review from castrojo as a code owner January 4, 2025 06:59
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working github_actions Pull requests that update GitHub Actions code labels Jan 4, 2025
@tulilirockz
Copy link
Collaborator

I believe we should try using that setup-just action at some point, but this is a very nice idea

@m2Giles
Copy link
Member

m2Giles commented Jan 4, 2025

This should be more resistant

while [[ "${JUST_VERSION:-}" =~ null || -z "${JUST_VERSION:-}" ]]
do
    JUST_VERSION=$(curl -L https://api.github.com/repos/casey/just/releases/latest | jq -r '.tag_name')
done

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 6, 2025
@m2Giles m2Giles enabled auto-merge January 6, 2025 00:57
@m2Giles m2Giles added this pull request to the merge queue Jan 6, 2025
Merged via the queue into ublue-os:main with commit a894e6e Jan 6, 2025
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working github_actions Pull requests that update GitHub Actions code lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants