Skip to content

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

@Jimbo4350

Description

@Jimbo4350

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:

Neither PR touches proto files or proto tooling. Master's last CI run (779f539 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:

- 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions