fix!: validate HostnameSuffix and SSHConfigOptions' (#26154)#26226
Merged
Conversation
- 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)
|
👋 Hey @jdomeracki-coder! This PR is targeting the 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: If this is not a bug fix, it likely should not target a release branch. |
johnstcn
approved these changes
Jun 10, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Backport of #26154 to
release/2.29.Backport notes (cherry-pick conflict resolution)
codersdk/deployment.goconflicted becauserelease/2.29lacks the AI Gateway options that surround theworkspaceHostnameSuffixoption onmain. Resolved by keeping the branch's existing structure and applying only the upstream change to that region: the updatedworkspaceHostnameSuffixdescription. The other four hunks (theunicodeimport, theParseSSHConfigOptionrewrite plusValidate*helpers, the SSH config options description, andSSHConfigResponse.Validate) applied cleanly.Verified on the branch:
go build ./codersdk/... ./cli/... ./enterprise/cli/..., the newcodersdkvalidation tests, and golden/docs regeneration (cli/enterprise/cli--helpandserver-config.yamlgolden files plusdocs/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.