From ebbf2f8936a2df801501cb1ec30438b0d9882eab Mon Sep 17 00:00:00 2001 From: Anmol Nagpal Date: Tue, 8 Sep 2026 20:57:07 -0400 Subject: [PATCH] fix(smurf-tf): call stf fmt, the subcommand that exists `smurf stf format` is not a smurf subcommand; the Terraform format command is `stf fmt`. While smurf accepted an unknown subcommand as a positional argument the call printed a hint and exited 0, so this step passed for as long as it had existed while formatting and checking nothing. smurf v1.2.0 rejects unknown subcommands and exits 1, which is correct and which turned every caller that does not pin smurf_version red with no change in their own repository. The step is also the only one in the job that runs without --dir, so it covers the whole checkout rather than the target root: in a matrix over several roots, one badly formatted file fails every root at once. `stf fmt` has no --dir flag in any released smurf, so that is left as a comment for the release that adds one, rather than passing a flag older versions would reject. Reported in #447. --- .github/workflows/smurf-tf-workflow.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smurf-tf-workflow.yml b/.github/workflows/smurf-tf-workflow.yml index 9b246de2..ba293aff 100644 --- a/.github/workflows/smurf-tf-workflow.yml +++ b/.github/workflows/smurf-tf-workflow.yml @@ -272,9 +272,19 @@ jobs: with: version: ${{ inputs.smurf_version }} + # The subcommand is `fmt`. `smurf stf format` does not exist: it printed a + # hint and exited 0 until smurf started rejecting unknown subcommands, so + # this step passed for as long as it had existed having formatted nothing, + # then began failing on smurf v1.2.0 with no change here. + # + # It is also the only step in this job that runs without --dir, so it + # covers the whole checkout rather than the target root. `smurf stf fmt` + # gained a --dir flag after this was reported; pass it here once the + # release carrying it is out, otherwise a caller pinning an older + # smurf_version fails on an unknown flag. - name: ๐Ÿงน Terraform Format run: | - smurf stf format + smurf stf fmt - name: ๐Ÿ— Terraform Init run: |