Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,8 @@ jobs:
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH

- name: Install protobuf
run: |
sudo -E PATH=$PATH script/install-protobuf
sudo chmod +x /usr/local/bin/protoc
sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
sudo chmod -R og+r /usr/local/include/google/protobuf/
protoc --version

- uses: actions/setup-node@v6
- run: npm install -g @bufbuild/buf
- run: script/install-proto-tools
- run: make proto-fmt
- run: make check-protos check-api-descriptors
Comment on lines +84 to 88
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

The npm install @bufbuild/buf step installs the buf CLI into node_modules/.bin, but this directory is not added to PATH, so subsequent make invocations that call buf (via the protos target) will fail with buf: command not found on a clean runner. Consider either installing Buf globally (e.g. using a dedicated Buf GitHub Action or npm install -g @bufbuild/buf) or adjusting the workflow/Makefile to invoke npx buf or to add ./node_modules/.bin to PATH before running make.

Copilot uses AI. Check for mistakes.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ generate: protos

protos:
@echo "$(WHALE) $@"
@(cd ${ROOTDIR}/api && PATH="${ROOTDIR}/bin:${PATH}" protobuild --quiet ${API_PACKAGES})
@(cd ${ROOTDIR}/api && buf dep update)
@(cd ${ROOTDIR}/api && PATH="${ROOTDIR}/bin:${PATH}" buf generate)
@(cd ${ROOTDIR}/api && buf build --exclude-imports -o next.txtpb)
Comment on lines +99 to +101
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

Running buf dep update on every make protos invocation will continuously mutate api/buf.lock, which means the protobuf/check-api-descriptors CI jobs can start failing purely due to upstream dependency changes even when no .proto files were modified. To keep CI stable and descriptor checks deterministic, it would be better to move buf dep update into a separate, explicitly-run target (e.g. for dependency bumps) and have protos just consume the pinned dependencies from buf.lock.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

Will address this in a follow up

go-fix-acronym -w -a '^Os' $(shell find api/ -name '*.pb.go')
go-fix-acronym -w -a '(Id|Io|Uuid|Os)$$' $(shell find api/ -name '*.pb.go')

Expand All @@ -108,8 +110,8 @@ check-protos: protos ## check if protobufs needs to be generated again

check-api-descriptors: protos ## check that protobuf changes aren't present.
@echo "$(WHALE) $@"
@test -z "$$(git status --short | grep ".pb.txt" | tee /dev/stderr)" || \
((git diff $$(find . -name '*.pb.txt') | cat) && \
@test -z "$$(git status --short | grep ".txtpb" | tee /dev/stderr)" || \
((git diff $$(find . -name '*.txtpb') | cat) && \
(echo "$(ONI) please run 'make protos' when making changes to proto files and check-in the generated descriptor file changes" && false))

proto-fmt: ## check format of proto files
Expand Down
30 changes: 0 additions & 30 deletions api/Protobuild.toml

This file was deleted.

12 changes: 12 additions & 0 deletions api/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v2
plugins:
- remote: buf.build/protocolbuffers/go:v1.28.1
out: .
opt:
- module=github.com/containerd/nerdbox/api
- Mgoogle/rpc/status.proto=google.golang.org/genproto/googleapis/rpc/status
- local: protoc-gen-go-ttrpc
out: .
opt:
- module=github.com/containerd/nerdbox/api
- prefix=TTRPC
9 changes: 9 additions & 0 deletions api/buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/containerd/api-dev
commit: f5087db925de43418b7d3653b696e1df
digest: b5:97797fd6f6ab6cdd8f36de346ab539657348f4ff9cb37a5cb0c006447d354c8a46193131048defd4ad18e494fb9481ef23aafd9e9c9b6745d4b2a66f6786caff
- name: buf.build/googleapis/googleapis
commit: 004180b77378443887d3b55cabc00384
digest: b5:e8f475fe3330f31f5fd86ac689093bcd274e19611a09db91f41d637cb9197881ce89882b94d13a58738e53c91c6e4bae7dc1feba85f590164c975a89e25115dc
6 changes: 6 additions & 0 deletions api/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: v2
deps:
- buf.build/googleapis/googleapis
- buf.build/containerd/api-dev
modules:
- path: .
269 changes: 0 additions & 269 deletions api/next.pb.txt

This file was deleted.

Loading