Skip to content

handle resolve of NULL pointers #650

handle resolve of NULL pointers

handle resolve of NULL pointers #650

Workflow file for this run

name: Lint protobuf API
on:
push:
branches:
- main
- v*
paths:
- api/**
- docs/content/en/docs/reference/grpc-api.md
- .github/workflows/lint-proto.yaml
pull_request:
paths:
- api/**
- docs/content/en/docs/reference/grpc-api.md
- .github/workflows/lint-proto.yaml
jobs:
lint-proto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Lint protobuf
run: |
make protoc-gen-go-tetragon
# TODO: enable linting once we have a chance to fix the underlying issues
# make -C api lint EXTRA_BUF_FLAGS="--error-format=github-actions"
if ${{ github.event_name == 'push' }}; then
make -C api check-breaking EXTRA_BUF_FLAGS="--error-format=github-actions" BUF_BREAKING_AGAINST_BRANCH="origin/${{ github.ref_name }}"
else
make -C api check-breaking EXTRA_BUF_FLAGS="--error-format=github-actions" BUF_BREAKING_AGAINST_BRANCH="origin/${{ github.base_ref }}"
fi
make -C api format EXTRA_BUF_FLAGS="--exit-code --error-format=github-actions"
check-proto-generated:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
# renovate: datasource=golang-version depName=go
go-version: "1.25.6"
- name: Go version
run: go version
- name: Validate that generated files are up to date.
run: |
set -ex
# Don't run 'make protogen' here, as it duplicates linting and vendoring checks.
make protoc-gen-go-tetragon
make -C api vendor proto
test -z "$(git status --porcelain)"
if [ $? != 0 ]; then
git status
git diff
echo "Protobuf API generated files are outdated."
echo "Please run 'make protogen' and submit your changes."; exit 1
fi