Disable build history when maxEntries is zero - #7038
Closed
CAOShurong wants to merge 1 commit into
Closed
Conversation
Skip build-history recording entirely when history.maxEntries is explicitly set to zero, while still closing progress for normal builds. Cover successful and failed builds across the integration worker matrix and document the configuration. Closes moby#3798. Assisted-by: OpenAI Codex Signed-off-by: Shurong Cao <170531907+CAOShurong@users.noreply.github.com>
Member
|
replaced by #7040 |
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.
Closes #3798.
What changed
history.maxEntries = 0as an explicit request to disable build history.recordBuildHistorypath instead of creating START/COMPLETE records, provenance blobs, and trace data that GC deletes shortly afterward.buildkitd.toml.Because the solver now bypasses
recordBuildHistoryentirely in this mode, the build-completion metrics currently emitted from that history finalizer are also disabled. This matches the issue's request to completely ignore the History API; if those metrics should remain independent of history, they can be separated from the history-record path in a follow-up.Validation
go test -mod=vendor -buildvcs=false ./solver/llbsolver/history -count=1go test -mod=vendor -buildvcs=false -vet=off ./solver/llbsolver -count=1go vet -mod=vendor -buildvcs=false ./solver/llbsolver/historygo build -mod=vendor -buildvcs=false ./cmd/buildkitd ./cmd/buildctlTESTPKGS=./client TESTFLAGS='--run /TestBuildHistoryDisabled -v' ./hack/test integrationListenBuildHistory.Broader
go vet ./solver/llbsolver/... ./control ./clientstill reports three existing lost-cancel warnings insolver/llbsolver/export.goandsolver/llbsolver/history.go; this change does not modify those call sites.AI assistance
OpenAI Codex assisted with implementation and test development. I reviewed the resulting diff and ran the checks listed above.