ci: put the Wrangler CLI version under version control - #347
Open
FrameAutomata wants to merge 1 commit into
Open
ci: put the Wrangler CLI version under version control#347FrameAutomata wants to merge 1 commit into
FrameAutomata wants to merge 1 commit into
Conversation
Nothing in this repo said which Wrangler deploys tracewayapp.com. Neither website/package.json nor docs/package.json depended on wrangler, so the version was whatever cloudflare/wrangler-action defaulted to internally -- 3.90.0 on v3.15.0, and "4" (a range, so newest 4.x) on v4.0.0. A production deploy path whose tooling version is an implementation detail of a third-party action, changing under us on an action bump, is what #331 is about. wrangler-action resolves an already-installed Wrangler when the wranglerVersion input is absent, and when it is present accepts an installed version that satisfies it (installWrangler in wranglerAction.ts; the same code path is in v3.15.0's dist bundle, so this holds on the action major in use today and on v4). Adding wrangler as an exact devDependency therefore moves the version into package-lock.json, where npm ci pins it, a PR can change it visibly, and `npm ci && npm run build` under the ci label exercises it -- on a path that otherwise cannot be tested before a real release. website/ wrangler 3.114.17 (exact) docs/ wrangler 3.114.17 (exact) release-helm.yml has no npm project to hold a lockfile, so it is the one site that still states the version, and it states it exactly. A bare "3" would be a range the action re-resolves at deploy time, which is the drift the pin is meant to stop. 3.x, not 4: this makes the version knowable and testable, which is what was asked. Wrangler 4 is a config migration (website/wrangler.toml has main, [assets] and [observability.traces]; docs/ is assets-only) and wants its own change -- one that is now possible to validate in a PR instead of by deploying. Verified: both projects resolve `npx wrangler --version` to 3.114.17 from the lockfile, and `npm ci && npm run build` passes in each. Closes #331. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
FrameAutomata
added a commit
that referenced
this pull request
Aug 28, 2026
"3" is a range wrangler-action re-resolves to the newest 3.x on every deploy, so as a pin it only bounds the major. #347 puts the CLI version in website/ and docs/ package-lock.json and pins this job -- the one with no npm project -- to an exact 3.114.17. Adopting that block verbatim here, so the two PRs make byte-identical edits to this file and merge in either order without a conflict. The only line that differs is the one this PR exists for, @V3 -> @v4. The docs and website wranglerVersion pins stay as they are: they are the safety net if this lands before #347, and an installed 3.114.17 satisfies "3" once it does, so the lockfile still decides. They can be dropped in a follow-up once both are in. Refs #326, #331. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 28, 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.
Closes #331 — "Real, we should lock down the version".
What was actually unpinned
Nothing in the repo said which Wrangler deploys
tracewayapp.com. Neitherwebsite/package.jsonnordocs/package.jsondepended onwrangler, so the version was an implementation detail ofcloudflare/wrangler-action:wranglerVersionis unsetv3.15.0(in use today)DEFAULT_WRANGLER_VERSION = "3.90.0"v4.0.0(proposed in #344)"4"— a range, so newest 4.x at deploy timeSo today it is an exact version nobody chose, and after an action bump it becomes a floating one. Either way the tooling version on a production deploy path lives in someone else's repo.
The mechanism this uses
I read
installWranglerrather than assuming (src/wranglerAction.tsonmain, and confirmed the same code path is inv3.15.0'sdist/index.mjs):An already-installed Wrangler wins when the input is absent, and is accepted when it satisfies the input. Both workflows already run
npm ciin the sameworkingDirectorythe action is given, so a devDependency lands exactly where the action looks.That also means this composes with #344 in either merge order: #344 sets
wranglerVersion: "3", an installed 3.114.17 satisfies it, so the lockfile still decides.The change
release-helm.ymlhas no npm project to hold a lockfile, so it stays the one site that states the version — exactly, not as a bare major."3"is a range the action re-resolves on every deploy, which is the drift the pin exists to stop.The real gain is that this is the first version of this that a PR can test.
npm ci && npm run buildunder thecilabel now exercises the pinned CLI, on a path that otherwise has no pre-release validation at all.Why 3.x and not 4
Locking down ≠ migrating. Wrangler 4 is a config migration —
website/wrangler.tomlis a Worker withmain,[assets]and[observability.traces];docs/wrangler.tomlis assets-only — and it deserves its own change. That change is now possible to validate in a PR instead of by deploying to production, which it wasn't before this.Verification
npm ci && npm run buildpasses in both.Not run: the deploys themselves. As established on #331,
workflow_dispatchis not a dry run on this path — it publishes to production Cloudflare.🤖 Generated with Claude Code