chore(tracing): drop the root SDK copy, ship the vendored submodule in images - #233
Merged
Conversation
fedemaleh
approved these changes
Sep 2, 2026
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.
Follow-up to #215.
nptrace.sh, a second copy of the tracing shell SDK that already drifted from thevendor/catalog-tracing-shsubmodule.k8s/logging/scheduled_task/loggingload the SDK only from the submodule and keep the loud warning when it is missing.publish-images.ymlchecks the submodule out for the three image builds, so the images carry the SDK instead of relying on the root copy.What happens if the submodule is missing
Nothing breaks. The workflow scripts run as plain logging:
k8s/loggingsources the SDK only whenvendor/catalog-tracing-sh/nptrace.shexists. Without it nothing is sourced and no ERR/EXIT traps are installed.Every
np_scope_*helper starts withcommand -v np_trace_… >/dev/null || return 0, andlog errorcalls_np_scopes_trace_error … || true, which returns 0 as soon as there is nonp_trace_adopt. Every call site is a successful no-op.The only visible difference is one line, emitted once when the run is traced (
NP_TRACEandNP_API_KEYset) but the SDK is absent:Today the root copy silently covers a missing submodule, so this warning never fires. After this PR an image built without the submodule still works but says so in the workflow log, and the scope's trace shows only the orchestrator's stations without the step detail.
Covered by
k8s/utils/tests/trace_logging.bats: "without NP_TRACE / without NP_API_KEY, logging is byte-identical to plain logging" and "a traced run with credentials but NO bundled SDK warns loudly instead of degrading silently".Merge order
Depends on nullplatform/actions-nullplatform#99 (the reusable workflow gains a
submodulesinput). Merge that first: until it lands, the reusable workflow rejects the unknownsubmodulesinput and a tag push would fail the image build.