ITADN

CI: `buf` version unpinned, causing generated proto files to drift

#1184ClosedJimbo4350 创建于 2026-04-16
J
Jimbo4350commented
## Problem Multiple open PRs fail the `[cardano-rpc] Check that generated files from proto definitions are up to date` CI step with the same output: ``` Generated files differ from repository files: M cardano-rpc/gen/Proto/Cardano/Rpc/Node.hs M cardano-rpc/gen/Proto/Utxorpc/V1beta/Cardano/Cardano.hs M cardano-rpc/gen/Proto/Utxorpc/V1beta/Query/Query.hs M cardano-rpc/gen/Proto/Utxorpc/V1beta/Submit/Submit.hs ``` Affected PRs observed so far: - #1123 (2026-04-14) - #1175 (2026-04-16) Neither PR touches proto files or proto tooling. Master's last CI run (779f539e4 on 2026-04-14) passed this same check with the same committed gen files. ## Root cause `.github/workflows/haskell.yml` downloads `buf` from the unpinned `releases/latest` URL: ```yaml - name: '[Linux] [cardano-rpc] Install buf tool' if: runner.os == 'Linux' run: | curl -sSL "https://github.com/bufbuild/buf/releases/latest/download/buf-Linux-x86_64" -o "/usr/local/bin/buf" chmod +x /usr/local/bin/buf ``` When `buf` publishes a new release, its generated output can differ from what was committed when the last regen ran. Every PR opened after that point fails the check until someone regenerates with the new `buf`. ## Fix options 1. Pin `buf` to a specific version in the workflow (matches the proto-lens-protoc install, which respects the cabal.project index-state). 2. Regenerate `cardano-rpc/gen/` with current `buf` and commit to master — only resolves until the next `buf` release. Option 1 is the durable fix.
关闭于 2026-04-17 1 条评论