mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(mise): upgrade helm to 3.21 to fix helm testdata generation (#25520)
With `helm=3.12.0`, when running `make -B
helm/coder/tests/testdata/.gen-golden` it doesn't respect the namespace
override defined in `helm/coder/tests/chart_test.go`:
```go
// runHelmTemplate runs helm template on the given chart with the given values and
// returns the raw output.
func runHelmTemplate(t testing.TB, helmPath, chartDir, valuesFilePath, namespace string) (string, error) {
// Ensure that valuesFilePath exists
if _, err := os.Stat(valuesFilePath); err != nil {
return "", xerrors.Errorf("values file %q does not exist: %w", valuesFilePath, err)
}
cmd := exec.Command(helmPath, "template", chartDir, "-f", valuesFilePath, "--namespace", namespace)
t.Logf("exec command: %v", cmd.Args)
out, err := cmd.CombinedOutput()
return string(out), err
}
```
This results in:
```diff
$ git diff | head
diff --git a/helm/coder/tests/testdata/auto_access_url_1_coder.golden b/helm/coder/tests/testdata/auto_access_url_1_coder.golden
index be09066fb1..a6a064e535 100644
--- a/helm/coder/tests/testdata/auto_access_url_1_coder.golden
+++ b/helm/coder/tests/testdata/auto_access_url_1_coder.golden
@@ -12,14 +12,14 @@ metadata:
app.kubernetes.io/version: 0.1.0
helm.sh/chart: coder-0.1.0
name: coder
- namespace: coder
+ namespace: default
```
Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html
|
||||
# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html
|
||||
|
||||
[[tools."aqua:ahmetb/kubectx/kubens"]]
|
||||
version = "0.9.4"
|
||||
@@ -481,9 +481,13 @@ checksum = "sha256:54c2ed3a6b4f2f5da1056fb6e83d6b73b592e06684b65a5999174fabbb251
|
||||
url = "https://github.com/golangci/golangci-lint/releases/download/v1.64.8/golangci-lint-1.64.8-windows-amd64.zip"
|
||||
|
||||
[[tools."http:helm"]]
|
||||
version = "3.12.0"
|
||||
version = "3.21.0"
|
||||
backend = "http:helm"
|
||||
|
||||
[tools."http:helm"."platforms.linux-x64"]
|
||||
checksum = "blake3:c21872f94494e4f245140c5d274d212c68cf7db89d3ecfe1f080a1cd8585377f"
|
||||
url = "https://get.helm.sh/helm-v3.21.0-linux-amd64.tar.gz"
|
||||
|
||||
[[tools.kubectx]]
|
||||
version = "0.9.4"
|
||||
backend = "aqua:ahmetb/kubectx"
|
||||
|
||||
@@ -60,7 +60,7 @@ lazygit = "0.61.1"
|
||||
# the dogfood image is linux/amd64-only and nobody on the team runs
|
||||
# helm via mise on Windows.
|
||||
[tools."http:helm"]
|
||||
version = "3.12.0"
|
||||
version = "3.21.0"
|
||||
url = 'https://get.helm.sh/helm-v{{version}}-{{os(macos="darwin")}}-{{arch(x64="amd64")}}.tar.gz'
|
||||
|
||||
# sqlc (coder fork) bundles sqlite via cgo, so the `go install` build
|
||||
|
||||
Reference in New Issue
Block a user