feat(helm/coder): make HTTPS redirect status code configurable - #27360
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
nickvigilante
left a comment
There was a problem hiding this comment.
301 and 308 have differences in functionality, where 308 does not permit downgrades from POST to GET. Is this intentional?
|
@nickvigilante intentional yes, avoidable no: 308 is not supported by ALB which means the implementation of the gateway objects fails. I fully agree with the default of 308 but for the people who can't use it, this aims to add an option to make a trade-off |
|
@02strich Thanks for the quick response! I'm going to defer the review to one of our engineers on this one, so stay tuned. |
|
thanks for the PR @02strich - I added a review item for one section. If you can add that and sign the CLA as next steps please. |
|
thanks @rowansmithau I'll look into the CLA tomorrow, but I am not seeing the review item - where can i find that? |
apologies, forgot to hit submit on the in progress review! |
|
I have read the CLA Document and I hereby sign the CLA |
|
@rowansmithau I think all done! Thank you for the quick feedback |
|
LGTM, approved |
|
@rowansmithau I am sorry to bother, but seems like the windows unit tests are broken with something unrelated to this change - any ideas? |
|
@02strich I did some research myself on this, and the CI failures are unrelated to your work in this PR. It seems to be a flake installing a specific Go tool ( |
## What Add `shell: bash` to the `Install Go mise tools` step in the `test-go-pg` job so it runs under Git bash on the `windows-2022` matrix leg. ## Why `test-go-pg (windows-2022)` has been failing in the **Normalize File and Directory Timestamps** step with: ``` mtimehash: command not found ##[error]Process completed with exit code 127. ``` before any tests run, which trips the aggregate `required` gate. Root cause: the `Install Go mise tools` step had no `shell:`, so on Windows it ran under **PowerShell**, while `./.github/scripts/retry.sh` is a bash script (`#!/usr/bin/env bash`). The step silently no-oped on Windows (zero output), so `mtimehash` was only present when the mise tool cache was warm. On a cache miss it was never installed, and the normalize step failed with exit 127. `main` stays green only because the cache is usually warm — both green and failing runs use the same `depot-windows-2022-16` runner, so this is **not** a fork/runner-routing issue. Pre-existing CI-tooling issue, unrelated to the change that surfaced it (a Helm-only community PR, #27360). ## Fix One line: pin the step to `shell: bash` so the install actually runs on Windows and repairs a cache miss instead of being silently skipped. ## Verification <details> <summary>Local proof that the step's install target builds and <code>mtimehash</code> runs under bash</summary> ``` $ bash ./.github/scripts/retry.sh --max-attempts 1 -- echo "retry.sh OK under bash" retry.sh OK under bash $ GOBIN=/tmp/demobin go install github.com/slsyy/mtimehash/cmd/[email protected] $ ls -l /tmp/demobin/mtimehash -rwxr-xr-x 1 coder coder 6692858 /tmp/demobin/mtimehash # the tool that was "command not found" now runs and rewrites the mtime: $ printf 'hello' > /tmp/mt.txt # mtime 2026-07-24 15:32 $ find /tmp/mt.txt | /tmp/demobin/mtimehash # exit 0 $ # mtime now 1997-11-30 (content-hash derived) ``` </details> Final confirmation is this PR's own `test-go-pg (windows-2022)` run. Note: if the mise cache is warm on this run the job passes regardless; the fix specifically hardens the cache-miss path this step exercises on Windows. ## Follow-up (not in this PR) - Make the normalize step resilient (skip when `mtimehash` is absent / invoke via `mise exec`) so a missing cache optimizer can't hard-fail the job. - Audit other Windows `run:` steps that invoke `retry.sh`/bash scripts without `shell: bash`. Linear: DOCS-605 > This PR was created with AI assistance (Coder Agents).
Add coder.httproute.httpsRedirect.statusCode to configure the HTTPRoute redirect response code, defaulting to 308. Validate that the value is one of 301, 302, 303, 307, or 308.
Add coder.httproute.httpsRedirect.statusCode to configure the HTTPRoute redirect response code, defaulting to 308. Validate that the value is one of 301, 302, 303, 307, or 308.