Merged
Conversation
For example, this slims down the airflow-operator image from 615MiB to 147MiB. This improvement is a combination of the size of the debuginfo itself (~200MiB per binary), and not having to include build dependencies just because our debuginfo refers to them (primarily, this ended up pulling in GCC, which sits at ~260MiB just on its own).
NickLarsenNZ
approved these changes
Jun 11, 2025
Member
NickLarsenNZ
left a comment
There was a problem hiding this comment.
LGTM, tested with nifi-operator.
It did still take a little long, (DONE IN: 102.86s) but I guess that's just my machine, and maybe the operator I chose to test on.
Contributor
Author
|
Yeah that's still pretty slow, but also not super actionable without a before-number to compare against (also, is this a fresh or incremental build?). I obviously think there's more work to be done eventually, but if it's at least a net improvement then I'd be inclined to say that's future work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Primarily by disabling debug info.
For example, this slims down the airflow-operator image from 615MiB to 147MiB, and takes the incremental redeploy time from 57s to 29s (on my machine).
This improvement is a combination of the size of the debuginfo itself (~200MiB per binary), and not having to include build dependencies just because our debuginfo refers to them (primarily, this ended up pulling in GCC, which sits at ~260MiB just on its own).
The old behaviour (useful if you want to run it under a debugger.. though we probably want to support that separately somehow) can be restored by adding
--arg debuginfo 2to thenix-buildcall.In addition, this PR adds an option to remove the shell (and associated utililties) from the built images. This can be done by setting
--arg includeShell false, but is disabled by default because not all operators are compatible yet (in particular: stackabletech/secret-operator#608).