Skip to content

fix!: validate HostnameSuffix and SSHConfigOptions' (#26154)#26226

Merged
f0ssel merged 1 commit into
release/2.29from
cherry-pick/26154/release/2.29
Jun 11, 2026
Merged

fix!: validate HostnameSuffix and SSHConfigOptions' (#26154)#26226
f0ssel merged 1 commit into
release/2.29from
cherry-pick/26154/release/2.29

Conversation

@jdomeracki-coder

@jdomeracki-coder jdomeracki-coder commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Backport of #26154 to release/2.29.

Backport notes (cherry-pick conflict resolution)

codersdk/deployment.go conflicted because release/2.29 lacks the AI Gateway options that surround the workspaceHostnameSuffix option on main. Resolved by keeping the branch's existing structure and applying only the upstream change to that region: the updated workspaceHostnameSuffix description. The other four hunks (the unicode import, the ParseSSHConfigOption rewrite plus Validate* helpers, the SSH config options description, and SSHConfigResponse.Validate) applied cleanly.

Verified on the branch: go build ./codersdk/... ./cli/... ./enterprise/cli/..., the new codersdk validation tests, and golden/docs regeneration (cli/enterprise/cli --help and server-config.yaml golden files plus docs/reference/cli/server.md) all matched the cherry-picked content. Net diff is identical to the original PR (11 files, +681/-39).

Generated by Coder Agents on behalf of @jdomeracki-coder.

- Adds server-side and client-side validation for
CODER_CONFIGSSH_HOSTNAME_SUFFIX and CODER_SSH_CONFIG_OPTIONS.
- **Server-side breaking change:** invalid values for either of these will cause `coderd` to exit with an error.
- Client-side: `coder config-ssh` will exit with an error if it detects invalid config.
- Adds tests for the above

Local smoke-testing: ran `develop.sh --env-file <path to an env file
containing badness>`. Validated that server startup failed as expected.

> 🤖 Generated by Coder Agents with supervision from a human.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit a26c46a)
@github-actions github-actions Bot added the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Jun 10, 2026
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

👋 Hey @jdomeracki-coder!

This PR is targeting the release/2.29 release branch, but its title does not start with fix: or fix(scope):.

Only bug fixes should be cherry-picked to release branches. If this is a bug fix, please update the PR title to match the conventional commit format:

fix: description of the bug fix
fix(scope): description of the bug fix

If this is not a bug fix, it likely should not target a release branch.

@jdomeracki-coder jdomeracki-coder added the cherry-pick/v2.29 Needs to be cherry-picked to the 2.29 release branch label Jun 10, 2026 — with Coder
@f0ssel f0ssel merged commit 320e549 into release/2.29 Jun 11, 2026
43 of 44 checks passed
@f0ssel f0ssel deleted the cherry-pick/26154/release/2.29 branch June 11, 2026 23:21
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick/v2.29 Needs to be cherry-picked to the 2.29 release branch release/breaking This label is applied to PRs to detect breaking changes as part of the release process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants