build(sketchcollector): wire asap-precompute-go replace directive - #231
Merged
Merged
Conversation
Each Phase-2 shim depends on github.com/ProjectASAP/asap-precompute-go, a sibling private module with no module-proxy presence. Mirror the sketchlib-go replace pattern so OCB resolves it to the local checkout. Without this, the multi-plugin sketchcollector binary fails to build once any shim PR (#226-#230) merges. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
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.
Why this PR
The OTel collector distribution
sketchcollectoris assembled by OCB fromopentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml. It bundles all five sketch processors (ddsketch, KLL, HLL, countsketch, countminsketch) plus their merge variants into a single binary.After Phase 2 shim refactors landed in #226 - #230, every sketch processor's
go.modnowrequires the private modulegithub.com/ProjectASAP/asap-precompute-go. That module does not exist on the public Go proxy /sum.golang.org, so the OCB-drivengo mod tidyfails:This blocks the user's "single sketchcollector binary including all sketches plugins" workflow today.
What this PR does (two-file change)
opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml— add areplaces:entry that redirectsgithub.com/ProjectASAP/asap-precompute-goto the in-repo checkout. Mirrors the existingsketchlib-gopattern. Path note:asap-precompute-golives as a subdirectory of this repo (ASAPCollector/asap-precompute-go), unlikesketchlib-gowhich is a sibling repo, so the relative path is../../../asap-precompute-go(one fewer..than thesketchlib-goentry).build_sketchcollector.sh— defensively append the same replace to the OCB-generatedgo.modif it isn't already present, mirroring the existing sketchlib-go grep+append guard. This handles the case where OCB strips replaces during go.mod regeneration.The intent of one binary including all five sketch plugins (per
builder-config.yamllines 147-156) is preserved — this PR just makes the OCB-generatedgo.modresolveasap-precompute-goto the local checkout instead of failing on a missing module-proxy lookup.Verification
./build_sketchcollector.shwith these two file changes against currentorigin/main(which has all five Phase-2 shim PRs merged): build succeeds end-to-end. OCB tidy resolves the replace directive, compiles, and emitscmd/sketchcollector/sketchcollector(~470 MB binary).cmd/sketchcollector/go.modafter the build — both private-module replaces are wired correctly:replacement directory ... does not existonasap-precompute-goduringgo mod tidy.Test plan
./build_sketchcollector.shproduces a workingsketchcollectorbinary onorigin/mainwith the five Phase-2 shim PRs merged.Out of scope
Independent of and parallel to PR
phase2/snapshot-cache-correctness-and-common-wrappers.Authoring note
This PR was authored by an automated agent (Claude Code).
View Claude Code session