Skip to content

Rename "wrangler_ssh" to "ssh" in Containers configuration#13567

Merged
gpanders merged 2 commits intomainfrom
ganders/ukyyznvnorrk
Apr 16, 2026
Merged

Rename "wrangler_ssh" to "ssh" in Containers configuration#13567
gpanders merged 2 commits intomainfrom
ganders/ukyyznvnorrk

Conversation

@gpanders
Copy link
Copy Markdown
Member

@gpanders gpanders commented Apr 16, 2026

"wrangler_ssh" is redundant since this option is set in the Wrangler config file. Rename it to just "ssh", while still supporting "wrangler_ssh" for backward compatibility.



Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 16, 2026

🦋 Changeset detected

Latest commit: 7b2c8d4

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Apr 16, 2026
@workers-devprod workers-devprod requested review from a team and jamesopstad and removed request for a team April 16, 2026 13:38
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 16, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

✅ All changesets look good

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 16, 2026

The review has been posted on PR #13567. Here's a summary of the findings:

Two issues identified:

  1. Missing deprecation warning for wrangler_ssh — Every other deprecated container field in the validation code (instances, durable_objects, configuration) emits a diagnostics.warnings.push(...) to nudge users toward the new name. The wrangler_ssh backward-compat path is silent, so users will never learn to migrate. This is inconsistent with the codebase convention at validation.ts:3328-3338.

  2. No diagnostic when both ssh and wrangler_ssh are specified — If a user provides both fields, ssh silently wins and the wrangler_ssh value is discarded at validation.ts:3398-3406. An error would prevent confusing behavior from conflicting values.

A concrete suggestion with both fixes was posted as a code suggestion on the PR.

github run

@gpanders gpanders force-pushed the ganders/ukyyznvnorrk branch from 7d0bbbc to c1e4acc Compare April 16, 2026 13:39
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 16, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13567

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13567

miniflare

npm i https://pkg.pr.new/miniflare@13567

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13567

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13567

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13567

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13567

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13567

wrangler

npm i https://pkg.pr.new/wrangler@13567

commit: 7b2c8d4

@gpanders gpanders force-pushed the ganders/ukyyznvnorrk branch from c1e4acc to 101080d Compare April 16, 2026 13:53
@gpanders
Copy link
Copy Markdown
Member Author

/bonk rereview

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

Re-reviewed after the update. The deprecation warning for wrangler_ssh has been added (lines 3339-3343) and is now consistent with the pattern used by the other deprecated container fields (instances, durable_objects, configuration). The backward-compat test at line 2052 verifies the warning is emitted.

The previous review also flagged the missing "both ssh and wrangler_ssh specified" error. Looking at the rest of the codebase, none of the other deprecated container fields (instances/max_instances, configuration/top-level fields) emit an error when both old and new forms are present — they just warn and move on. So the current behavior (deprecation warning + ssh wins) is consistent with the existing convention. I don't think adding a special-case error here is necessary.

Everything else looks good:

  • Type definitions in environment.ts are clean — ssh is the primary field, wrangler_ssh is @deprecated and @hidden
  • The rewrite logic (sshwrangler_ssh for the API) at lines 3403-3407 is correct
  • Validation uses the user-facing field name in error messages via sshField
  • Port validation correctly guards the range check with typeof sshPort === "number" (fixes a subtle bug from the original code where undefined < 1 would evaluate to false and silently pass)
  • Test coverage is solid: new field, backward compat alias with deprecation warning assertion, validation errors, and schema test
  • Changeset is well-formed

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 16, 2026

Re-review posted on PR #13567 with an approval. The deprecation warning from the first review has been addressed, and the remaining suggestion (error when both ssh and wrangler_ssh are specified) isn't necessary since it would be inconsistent with how all other deprecated container fields are handled in this codebase.

github run

"wrangler_ssh" is redundant since this option is set in the Wrangler
config file. Rename it to just "ssh", while still supporting
"wrangler_ssh" for backward compatibility.
@gpanders gpanders force-pushed the ganders/ukyyznvnorrk branch from 101080d to dfa4c8e Compare April 16, 2026 14:22
@nikitassharma
Copy link
Copy Markdown
Member

Codeowners approval required for this PR:

* @cloudflare/wrangler

Show detailed file reviewers

* packages/workers-utils/src/config/environment.ts: [@cloudflare/wrangler]

* packages/workers-utils/src/config/validation.ts: [@cloudflare/wrangler]

* packages/wrangler/src/**tests**/containers/deploy.test.ts: [@cloudflare/wrangler]

* packages/wrangler/src/**tests**/containers/schema.test.ts: [@cloudflare/wrangler]

Looks like cloudchamber isn't listed as a codeowner for containers/ and cloudchamber/ tests? I wonder if this can be updated by us. It would be nice to get notifications about changes to those files.

Copy link
Copy Markdown
Contributor

@emily-shen emily-shen left a comment

Choose a reason for hiding this comment

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

will the diffs on deploy still show 'wrangler_ssh'?

@gpanders
Copy link
Copy Markdown
Member Author

will the diffs on deploy still show 'wrangler_ssh'?

Yes, good catch. I just pushed a change to fix that so that it shows containers.configuration.ssh instead of containers.configuration.wrangler_ssh.

Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Apr 16, 2026
@emily-shen
Copy link
Copy Markdown
Contributor

Looks like cloudchamber isn't listed as a codeowner for containers/ and cloudchamber/ tests? I wonder if this can be updated by us. It would be nice to get notifications about changes to those files.

#13573 here you go

@gpanders gpanders merged commit d8c895a into main Apr 16, 2026
63 of 64 checks passed
@gpanders gpanders deleted the ganders/ukyyznvnorrk branch April 16, 2026 16:52
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants