Skip to content

fix(ci): migrate from pages-action to wrangler-action - #1032

Merged
clalancette merged 5 commits into
mainfrom
fix/migrate-wrangler-action
Mar 20, 2026
Merged

clalancette merged 5 commits into
mainfrom
fix/migrate-wrangler-action

Conversation

@clalancette

@clalancette clalancette commented Mar 19, 2026 •

Copy link
Copy Markdown
Contributor

The deprecated pages-action@v1.5.0 (using wrangler v2) rejects commit messages containing multi-byte UTF-8 characters such as "→". Migrating to wrangler-action@v3 resolves this and uses the supported wrangler v4.

Changelog

None.

Docs

None.

Description

After merging in #949, which had UTF-8 arrows in the commit message, we were failing to upload to cloudflare in the "playground" action: https://github.com/foxglove/foxglove-sdk/actions/runs/23294567795/job/67752339585 . Besides that, there is warning that pages-action is deprecated, and indeed it is: https://github.com/cloudflare/pages-action . This PR should solve both of the issues by upgrading us to wrangler-action . I won't know for sure if this fixes the issue until CI runs.

…action

The deprecated pages-action@v1.5.0 (using wrangler v2) rejects commit
messages containing multi-byte UTF-8 characters such as "→". Migrating
to wrangler-action@v3 resolves this and uses the supported wrangler v4.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
claude[bot]

This comment was marked as outdated.

@clalancette clalancette changed the title fix(ci): migrate from cloudflare/pages-action to cloudflare/wrangler-… fix(ci): migrate from pages-action to wrangler-action Mar 19, 2026
@gasmith

gasmith commented Mar 19, 2026 •

Copy link
Copy Markdown
Collaborator

Looks there's some name-plumbing to do. Before this PR:

screenshot-20260319-090541

With this PR:

screenshot-20260319-090422

Signed-off-by: Chris Lalancette <chris.lalancette@foxglove.dev>
clalancette and others added 3 commits March 19, 2026 13:01
wrangler-action@v3 doesn't support custom deployment names — it
hardcodes the environment to just "preview" or "production". Replace
its built-in deployment creation with explicit github-script steps
that restore the old "project-name (Preview/Production)" format.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace actions/github-script with gh CLI and JSON heredocs to create
GitHub Deployments. The previous github-script approach likely failed
silently because wrangler-action does not set deployment-url output
when gitHubToken is omitted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of migrating to wrangler-action (which lacks GitHub Deployment
naming support), stay on pages-action@v1.5.0 and set wranglerVersion
to "3" to fix the UTF-8 commit message rejection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The net change here is just adding wranglerVersion: "3" to both pages-action steps — the earlier attempt to migrate to wrangler-action was reverted. The fix itself is small and targeted, but the PR title/description still describe the migration that was abandoned. Should be updated before merge so the squash commit message is accurate.

(Previous review from me was on the pre-revert state and is no longer relevant.)

accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: "3"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: The PR title says "migrate from pages-action to wrangler-action" but the final change stays on cloudflare/pages-action@v1.5.0 and just pins wranglerVersion: "3". The title and description should be updated to match what this PR actually does — otherwise the squash commit message will be misleading.

Also: pages-action is deprecated. Pinning wrangler v3 is a reasonable short-term fix to unblock CI, but is there a follow-up planned to actually migrate to wrangler-action? Worth tracking if so.

@clalancette

Copy link
Copy Markdown
Contributor Author

Looks there's some name-plumbing to do. Before this PR:

Whew. Well, it looks like there is no way that either I or Claude could find to make that nicer; it seems to be hardcoded within wrangler-action. Thus we have two options:

  1. Keep using page-actions with an updated wrangler version. This will fix the immediate problem, but keeps us reliant on an archived action, and is what this PR does right now.
  2. Switch to using wrangler-action, and accept the regression. If we decide to go this route, then I can investigate wrangler-action in some more detail and possible file a bug/PR upstream.

@gasmith What do you think?

@gasmith

gasmith commented Mar 19, 2026

Copy link
Copy Markdown
Collaborator

I was going to suggest filing an issue, but check out that familiar avatar: cloudflare/wrangler-action#333 (comment)

@gasmith gasmith left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, I think this is the best we can do for now.

@gasmith gasmith left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derp, where's that approve button...

@clalancette

Copy link
Copy Markdown
Contributor Author

I was going to suggest filing an issue, but check out that familiar avatar: cloudflare/wrangler-action#333 (comment)

Oh, haha. Even better, there is a PR to fix it that has not been merged: cloudflare/wrangler-action#355 .

Well, I'm going to go ahead and merge this one in, and we can update later on if the maintainers ever fix that bug.

@clalancette
clalancette merged commit 6e9e534 into main Mar 20, 2026
47 checks passed
@clalancette
clalancette deleted the fix/migrate-wrangler-action branch March 20, 2026 14:00

This branch was successfully deployed

3 active (1 outdated) deployments
foxglove-sdk-playground (Preview) — 68db8324 Deployed Mar 19, 2026 by foxglovebot
foxglove-sdk-api-docs (Preview) — 68db8324 Deployed Mar 19, 2026 by github-actions[bot]
preview — c4c6029f Deployed Mar 19, 2026 by foxglovebot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants