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

The go build of krane can fail and the script still proceeds (and fails on the krane binary not being available) #465

Open
mikn opened this issue Feb 24, 2025 · 1 comment

Comments

@mikn
Copy link

mikn commented Feb 24, 2025

Hi again! Your friendly neighbourhood Build System (W)rapper! It turns out that this line here: https://github.com/bottlerocket-os/twoliter/blob/develop/tools/krane/build.rs#L54

(Perhaps) mistakenly assumes that if you put an .expect() on .status() from Command that it will error if the command results in a non-zero exit code. This is not actually the case, as .status() returns a Result<StatusCode> and the .expect() only gets raised if there is no StatusCode inside, the command may still have failed.

I would suggest to also check the status code of the go command ❤

@cbgbt
Copy link
Contributor

cbgbt commented Feb 24, 2025

This is, indeed, an oversight. This is at the very least caught for official releases by the integration tests run in our GitHub Actions CI.

We'll take a look at protecting against build failures in the build script! Thanks for the heads up!

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

No branches or pull requests

2 participants