-
Notifications
You must be signed in to change notification settings - Fork 264
[RFC][Rust Planner] Reduce image size by using glibc, and copying built binary #132
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
Conversation
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
Tests are failing due to this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.ElementsMatch( | ||
expected.StartStage.GetInputFiles(), | ||
actual.StartStage.GetInputFiles(), | ||
"StartStage.InputFiles should match", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verified with @LucilleH that it makes sense to drop getFileNames
for StartStage.
Because:
- The motivation to introduce
getFileNames
was to normalize the filepaths used. The filepaths would differ based on which directory thego test
command is invoked from. - This doesn't apply to StartStage, since the InputFiles are relative to the BuildStage's container. And not relative to the local laptop/CICD invoking
go test
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Reduce image size by
Replace
gcc
withglibc
in the Runtime image.gcc
is needed in the DevPackages for the Build Stage. Replacing it withglibc
doesn't work becauseglibc
nix pkg is not available on mac OS (linux only). We want universal packages (defined as linux and mac, lol) since we share DevPackages withdevbox shell
.Copy just the specific built binary to the Runtime image.
How was it tested?
Using the basic
testdata/rust/rust-stable-hello-world
project: