From 3647a4ccb58dff8c4278d2b404a7ad6e65697e2d Mon Sep 17 00:00:00 2001 From: Jeremy Drouillard Date: Tue, 14 Jul 2026 13:27:19 -0700 Subject: [PATCH] Pin swag version in swagger-install task The task installed swag via `go install .../swag@latest`, so `task docs` could silently pick up a newer swag release with different schema-name disambiguation behavior than the version pinned in go.mod, reintroducing drift across contributors' machines. Resolve the version already recorded in go.mod instead of `@latest`. --- Taskfile.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index 18996f5b1b..20e8895b06 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -17,8 +17,13 @@ tasks: swagger-install: desc: Install the swag tool for OpenAPI/Swagger generation + vars: + # Pinned to the version already resolved in go.mod, so `task docs` always + # uses the same generator instead of drifting to whatever @latest is that day. + SWAG_VERSION: + sh: go list -m github.com/swaggo/swag/v2 | awk '{print $2}' cmds: - - go install github.com/swaggo/swag/v2/cmd/swag@latest + - go install github.com/swaggo/swag/v2/cmd/swag@{{.SWAG_VERSION}} helm-docs: desc: Generate Helm chart documentation