fix(ci): Always use submodule for npm cache key in setup-node.js action#8654
Merged
yurishkuro merged 1 commit intoMay 28, 2026
Merged
Conversation
Using JAEGER_UI_DIR for cache-dependency-path caused setup-node to fail on snapshot builds because the snapshot checkout (which runs just before) had not yet written package-lock.json to disk by the time setup-node evaluated the path. The submodule's package-lock.json is always present and its node version matches main, so it is a reliable cache key for both PR and snapshot builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Yuri Shkuro <github@ysh.us>
jaegertracingbot
approved these changes
May 28, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8654 +/- ##
==========================================
- Coverage 96.62% 96.59% -0.03%
==========================================
Files 334 334
Lines 17782 17782
==========================================
- Hits 17181 17177 -4
- Misses 452 455 +3
- Partials 149 150 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
yurishkuro
added a commit
that referenced
this pull request
May 28, 2026
…orrect UI version (#8655) Follow-up to #8653 and #8654. ## Problems 1. **`git fetch --unshallow`**: `rebuild-ui.sh` detects the shallow clone created by `checkout-ui-for-snapshot.sh` and runs `git fetch --unshallow` followed by `git fetch --all --tags`, downloading the entire jaeger-ui history. This is only needed to check whether the HEAD is exactly on a release tag — which can never be true for a snapshot commit. 2. **Wrong UI version in About panel**: The About panel showed "Jaeger UI v2.18.0" even when the snapshot was built from a commit 28 commits ahead of that release, because `package.json` only gets updated on official releases. ## Fixes ### Skip the tag-check block (`rebuild-ui.sh`) Introduce `JAEGER_UI_SKIP_RELEASE_CHECK` env var. When set, `rebuild-ui.sh` skips the unshallow + fetch + `git describe` block and goes straight to `npm ci`. `checkout-ui-for-snapshot.sh` sets this variable since snapshot commits are never release tags. The submodule/PR path is unchanged. ### Patch `package.json` version with short SHA (`checkout-ui-for-snapshot.sh`) After checking out the snapshot, patch `packages/jaeger-ui/package.json` in the ephemeral `$WORK_DIR` to append the short SHA to the version string, e.g. `2.18.0` → `2.18.0-1c082b77`. The About panel then shows "Jaeger UI v2.18.0-1c082b77", making it clear which exact UI commit is embedded. The submodule and all other files are untouched. ## Variables exported by `checkout-ui-for-snapshot.sh` | Variable | Purpose | |---|---| | `JAEGER_UI_DIR` | Path to the snapshot checkout; picked up by `make build-ui` via `JAEGER_UI_DIR ?= jaeger-ui` | | `JAEGER_UI_SKIP_RELEASE_CHECK` | Tells `rebuild-ui.sh` to skip the tag lookup and go straight to npm | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
vic-comm
pushed a commit
to vic-comm/jaeger
that referenced
this pull request
Jun 11, 2026
…on (jaegertracing#8654) Fixes the CI failure introduced by jaegertracing#8653. ## Root Cause In jaegertracing#8653, `setup-node.js` was updated to use `${JAEGER_UI_DIR}/package-lock.json` as `cache-dependency-path`. On snapshot builds (push to main), `JAEGER_UI_DIR` is set by the `checkout-ui-for-snapshot.sh` step — but `actions/setup-node` evaluated the path at step startup before the git `fetch`+`checkout` in that script had finished writing the working tree to disk. The file wasn't there, producing: ``` ##[error]Some specified paths were not resolved, unable to cache dependencies. ``` ## Fix Revert `setup-node.js` to always use the submodule's `jaeger-ui/package-lock.json` for both node version detection and the npm cache key. The submodule is always present and its version matches `jaeger-ui/main` closely enough that the cache remains effective. The snapshot build does a full `npm ci` anyway, so cache key precision is not critical there. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Victor Chidera Obiezue <obiezuechidera@gmail.com>
vic-comm
pushed a commit
to vic-comm/jaeger
that referenced
this pull request
Jun 11, 2026
…orrect UI version (jaegertracing#8655) Follow-up to jaegertracing#8653 and jaegertracing#8654. ## Problems 1. **`git fetch --unshallow`**: `rebuild-ui.sh` detects the shallow clone created by `checkout-ui-for-snapshot.sh` and runs `git fetch --unshallow` followed by `git fetch --all --tags`, downloading the entire jaeger-ui history. This is only needed to check whether the HEAD is exactly on a release tag — which can never be true for a snapshot commit. 2. **Wrong UI version in About panel**: The About panel showed "Jaeger UI v2.18.0" even when the snapshot was built from a commit 28 commits ahead of that release, because `package.json` only gets updated on official releases. ## Fixes ### Skip the tag-check block (`rebuild-ui.sh`) Introduce `JAEGER_UI_SKIP_RELEASE_CHECK` env var. When set, `rebuild-ui.sh` skips the unshallow + fetch + `git describe` block and goes straight to `npm ci`. `checkout-ui-for-snapshot.sh` sets this variable since snapshot commits are never release tags. The submodule/PR path is unchanged. ### Patch `package.json` version with short SHA (`checkout-ui-for-snapshot.sh`) After checking out the snapshot, patch `packages/jaeger-ui/package.json` in the ephemeral `$WORK_DIR` to append the short SHA to the version string, e.g. `2.18.0` → `2.18.0-1c082b77`. The About panel then shows "Jaeger UI v2.18.0-1c082b77", making it clear which exact UI commit is embedded. The submodule and all other files are untouched. ## Variables exported by `checkout-ui-for-snapshot.sh` | Variable | Purpose | |---|---| | `JAEGER_UI_DIR` | Path to the snapshot checkout; picked up by `make build-ui` via `JAEGER_UI_DIR ?= jaeger-ui` | | `JAEGER_UI_SKIP_RELEASE_CHECK` | Tells `rebuild-ui.sh` to skip the tag lookup and go straight to npm | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Victor Chidera Obiezue <obiezuechidera@gmail.com>
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.
Fixes the CI failure introduced by #8653.
Root Cause
In #8653,
setup-node.jswas updated to use${JAEGER_UI_DIR}/package-lock.jsonascache-dependency-path. On snapshot builds (push to main),JAEGER_UI_DIRis set by thecheckout-ui-for-snapshot.shstep — butactions/setup-nodeevaluated the path at step startup before the gitfetch+checkoutin that script had finished writing the working tree to disk. The file wasn't there, producing:Fix
Revert
setup-node.jsto always use the submodule'sjaeger-ui/package-lock.jsonfor both node version detection and the npm cache key. The submodule is always present and its version matchesjaeger-ui/mainclosely enough that the cache remains effective. The snapshot build does a fullnpm cianyway, so cache key precision is not critical there.🤖 Generated with Claude Code