Skip to content

ci: add proto generate check workflow#2322

Merged
c-julin merged 7 commits intomasterfrom
ci/proto-generate-check
Mar 18, 2026
Merged

ci: add proto generate check workflow#2322
c-julin merged 7 commits intomasterfrom
ci/proto-generate-check

Conversation

@c-julin
Copy link
Contributor

@c-julin c-julin commented Mar 18, 2026

Summary

  • Adds a GitHub Actions workflow that runs task proto:generate on PRs touching proto files
  • Fails CI if generated code is out of date (leverages the existing git diff --exit-code check in the task)

@c-julin c-julin force-pushed the ci/proto-generate-check branch from 13f9fe9 to c592464 Compare March 18, 2026 11:15
@c-julin c-julin force-pushed the ci/proto-generate-check branch from c592464 to 396254f Compare March 18, 2026 11:18
Comment on lines +43 to +46
- name: Generate protos
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
run: task proto:generate No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's the check? I guess we don't want the CI to generate the protos, we just want it to check if there's a diff after generating the protos right?

Also we need to pin the common-go dependency to avoid the random protogens due to other work e.g. policy materializer here) I assume

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the check was already in the taskfile and yes we do, theres a different issue with the policy materializer as it the first service in common-go that breaks our generate 😭

The policymaterializer service in buf.build/redpandadata/common doesn't
generate grpc server types in common-go, causing connect-gateway to
produce unresolvable imports. Console doesn't use this service, so
exclude it from generation.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / validate (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 18, 2026, 12:18 PM

c-julin added 2 commits March 18, 2026 12:13
Pin buf.build/redpandadata/common to a specific commit and update
buf.build/gen/go/redpandadata/core to resolve missing admin/v2 types.
Also exclude policymaterializer from frontend generation.
Change -f (file test) to -d (directory test) for build/bin/go which
is a directory, not a file. This allows Task to correctly detect
cached tool binaries and skip reinstallation.
@c-julin c-julin merged commit 24cd265 into master Mar 18, 2026
18 checks passed
@c-julin c-julin deleted the ci/proto-generate-check branch March 18, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants