From 6c37503030d1645374d6ce701b4d275dd90751ed Mon Sep 17 00:00:00 2001 From: Zeying Zhu Date: Mon, 4 May 2026 09:51:11 -0400 Subject: [PATCH] build(sketchcollector): wire asap-precompute-go replace directive 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) --- build_sketchcollector.sh | 3 +++ .../cmd/sketchcollector/builder-config.yaml | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/build_sketchcollector.sh b/build_sketchcollector.sh index 5257c835..1fb1317b 100755 --- a/build_sketchcollector.sh +++ b/build_sketchcollector.sh @@ -82,6 +82,9 @@ SKETCHCOL_DIR="${PATCH_DIR}/cmd/sketchcollector" if ! grep -qE "^replace[[:space:]]+github\.com/ProjectASAP/sketchlib-go" "${SKETCHCOL_DIR}/go.mod" 2>/dev/null; then echo "replace github.com/ProjectASAP/sketchlib-go => ${ROOT_DIR}/../sketchlib-go" >> "${SKETCHCOL_DIR}/go.mod" fi +if ! grep -qE "^replace[[:space:]]+github\.com/ProjectASAP/asap-precompute-go" "${SKETCHCOL_DIR}/go.mod" 2>/dev/null; then + echo "replace github.com/ProjectASAP/asap-precompute-go => ${ROOT_DIR}/asap-precompute-go" >> "${SKETCHCOL_DIR}/go.mod" +fi cd "${SKETCHCOL_DIR}" GONOSUMCHECK="github.com/ProjectASAP/*" GONOSUMDB="github.com/ProjectASAP/*" go build -o sketchcollector . 2>&1 diff --git a/opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml b/opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml index 6039268c..41998b94 100644 --- a/opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml +++ b/opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml @@ -322,3 +322,12 @@ replaces: # published commit and ApplyDelta / SerializeMsgpack / # NewFromState constructors would not resolve. - github.com/ProjectASAP/sketchlib-go => ../../../../sketchlib-go + # asap-precompute-go is a private module living as a sibling + # subdirectory of this repo (ASAPCollector/asap-precompute-go). + # Same redirect intent as sketchlib-go but a different path: the + # OCB-generated cmd/sketchcollector/go.mod lives 3 dirs deep under + # the ASAPCollector repo root (`./opentelemetry-collector-contrib-patch/cmd/sketchcollector`), + # so ../../../asap-precompute-go resolves to the in-repo subdirectory. + # (sketchlib-go uses one extra `..` because it lives as a sibling + # repo of ASAPCollector, one level up from this repo root.) + - github.com/ProjectASAP/asap-precompute-go => ../../../asap-precompute-go