Skip to content

Commit 5c5cbba

Browse files
gewenyu99claude
andcommitted
ci: pin the wizard-CI Node to 24, matching the monorepo
Supersedes the auto-derive approach with a simple hardcoded pin. The wizard's install broke on the old Node 20 pin once the wizard required Node 22+; pin to 24 to match the monorepo (PostHog/posthog .nvmrc v24.13.0, engines >=24 <25) and the wizard's own dev pin (volta 24.14.1). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 190a975 commit 5c5cbba

1 file changed

Lines changed: 2 additions & 34 deletions

File tree

.github/workflows/wizard-ci.yml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ jobs:
8989
input_source_repo: ${{ steps.resolve-inputs.outputs.source_repo }}
9090
input_source_pr_number: ${{ steps.resolve-inputs.outputs.source_pr_number }}
9191
input_source_pr_url: ${{ steps.resolve-inputs.outputs.source_pr_url }}
92-
# Node versions to test, read from the wizard's own CI matrix at the ref
93-
# under test — the workbench tracks whatever the wizard supports, no drift.
94-
node_versions: ${{ steps.node-matrix.outputs.node_versions }}
95-
build_node: ${{ steps.node-matrix.outputs.build_node }}
9692

9793
steps:
9894
- name: Resolve inputs
@@ -205,31 +201,6 @@ jobs:
205201
echo " source_pr_number: $SOURCE_PR_NUMBER"
206202
echo " source_pr_url: $SOURCE_PR_URL"
207203
208-
- name: Resolve wizard Node matrix
209-
id: node-matrix
210-
env:
211-
WIZARD_REF: ${{ steps.resolve-inputs.outputs.wizard_ref }}
212-
run: |
213-
# Test the wizard on exactly the Node versions its own CI matrix
214-
# declares, at the ref under test — so this stays in lockstep with the
215-
# wizard (add a version there and it is covered here) with no drift.
216-
# PostHog/wizard is public; resolve the ref to a SHA first so branch
217-
# names with slashes still fetch. Fall back to a sane default on any
218-
# miss so a bad read never empties the matrix.
219-
FALLBACK='["22.22.0", 24]'
220-
SHA=$(git ls-remote "https://github.com/PostHog/wizard.git" "$WIZARD_REF" 2>/dev/null | head -1 | cut -f1)
221-
[ -z "$SHA" ] && SHA="$WIZARD_REF"
222-
RAW=$(curl -fsSL "https://raw.githubusercontent.com/PostHog/wizard/${SHA}/.github/workflows/build.yml" 2>/dev/null || true)
223-
NODES=$(printf '%s' "$RAW" | grep -oE "node: \[[^]]*\]" | head -1 | sed -E "s/^node: //; s/'/\"/g")
224-
if ! printf '%s' "$NODES" | jq -e 'type == "array" and length > 0' >/dev/null 2>&1; then
225-
echo "Could not read wizard Node matrix (got: '${NODES}'); using fallback."
226-
NODES="$FALLBACK"
227-
fi
228-
BUILD_NODE=$(printf '%s' "$NODES" | jq -r '.[-1]')
229-
echo "node_versions=$NODES" >> "$GITHUB_OUTPUT"
230-
echo "build_node=$BUILD_NODE" >> "$GITHUB_OUTPUT"
231-
echo "Wizard Node matrix @ ${WIZARD_REF} (${SHA}): $NODES (build on $BUILD_NODE)"
232-
233204
- name: Generate trigger ID
234205
id: generate-id
235206
env:
@@ -492,9 +463,7 @@ jobs:
492463
- name: Setup Node.js
493464
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
494465
with:
495-
# Build the dep cache once on the newest supported Node; the cache key
496-
# is Node-agnostic (wizard SHA) and the built wizard is portable JS.
497-
node-version: ${{ needs.discover.outputs.build_node }}
466+
node-version: '24'
498467

499468
- name: Setup pnpm
500469
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
@@ -524,7 +493,6 @@ jobs:
524493
max-parallel: 10
525494
matrix:
526495
app: ${{ fromJson(needs.discover.outputs.apps) }}
527-
node: ${{ fromJson(needs.discover.outputs.node_versions) }}
528496
outputs:
529497
pr_url: ${{ steps.process-results.outputs.pr_url }}
530498
pr_number: ${{ steps.process-results.outputs.pr_number }}
@@ -558,7 +526,7 @@ jobs:
558526
- name: Setup Node.js
559527
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
560528
with:
561-
node-version: ${{ matrix.node }}
529+
node-version: '24'
562530

563531
- name: Setup pnpm
564532
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061

0 commit comments

Comments
 (0)