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

[cache] Fallback for failed build with cache #2082

Merged
merged 2 commits into from
May 24, 2024
Merged

Conversation

mikeland73
Copy link
Contributor

Summary

  • If we fail to build with caches, try again without them.
  • Added logging when build fails and user has substituters.

How was it tested?

Ran install on devbox project that installs cached terraform. Commented out --extra-substituters flag to force it to fail. Observed output indicating substituter error, and fallback to building from source.

image

@mikeland73 mikeland73 requested review from gcurtis and savil May 24, 2024 01:57
Copy link
Collaborator

@savil savil left a comment

Choose a reason for hiding this comment

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

+1 to sharing the output. Very helpful.

@@ -516,7 +529,6 @@ func (d *Devbox) installNixPackagesToStore(ctx context.Context, mode installMode
args.AllowInsecure = allowInsecure
err = nix.Build(ctx, args, installables...)
if err != nil {
color.New(color.FgRed).Fprintf(d.stderr, "Fail\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

is deleting this a good idea for non-nixcache scenarios (i.e. the common scenario)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we print error a few times (once for nix stderr, and once for devbox failing) so this was a third error (and not very informative because it was just fail). The nix output tends to be the most informative.

@mikeland73 mikeland73 merged commit 2c8e57f into main May 24, 2024
24 checks passed
@mikeland73 mikeland73 deleted the landau/fallback branch May 24, 2024 14:31
Copy link

sentry-io bot commented May 27, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ **Generic Error: <redacted errors.withStack>: <redacted usererr.combined> go.jetpack.io/devbox/internal/boxcli/usererr in... View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants