Skip to content

fix(debug): ensure reproducible builds in debug mode#1451

Merged
imjasonh merged 1 commit intoko-build:mainfrom
l-qing:fix/debug-reproducibility
Nov 24, 2024
Merged

fix(debug): ensure reproducible builds in debug mode#1451
imjasonh merged 1 commit intoko-build:mainfrom
l-qing:fix/debug-reproducibility

Conversation

@l-qing
Copy link
Contributor

@l-qing l-qing commented Nov 24, 2024

When use --debug build flag, a new dlv executable file is built into the image. However, during the build, some build flags are not specified, resulting in the binary being different each time, which ultimately causes the digest of the image to be inconsistent.

This change aims to ensure that, as long as the remote dlv code has not been updated, the digest remains consistent with each build.

When use `--debug` build flag, a new dlv executable file is built into the image.
However, during the build, some build flags are not specified, resulting in
the binary being different each time, which ultimately causes the digest of
the image to be inconsistent.

This change aims to ensure that, as long as the remote dlv code has not been
updated, the digest remains consistent with each build.
// install delve to tmp directory
args := []string{
"build",
"-trimpath",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

Thank you!

@imjasonh imjasonh enabled auto-merge (rebase) November 24, 2024 14:17
@imjasonh imjasonh merged commit 6dedb1e into ko-build:main Nov 24, 2024
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

Successfully merging this pull request may close these issues.

2 participants