Repository navigation
do not hide linitng errors - #13423
Conversation
|
(side effect was leftover files after |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the developer/CI flow so proto formatting issues are checked (and fail) instead of being auto-corrected before linting runs, making formatting problems visible during make check and in CI.
Changes:
- Make
make checkdepend oncheck-protos(proto formatting diff check) instead ofproto-fmt(auto-format). - Update several
.protofiles to matchbuf formatoutput. - Remove
make proto-fmtfrom the GitHub Actions protobuf job so CI no longer auto-mutates source before checking.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Switch check to run proto checks instead of formatting; impacts local/CI lint flow. |
| api/types/transfer/streaming.proto | Reformat fields to buf format indentation. |
| api/types/transfer/container.proto | Reformat header and fields (but see comment re: remaining tab). |
| api/runtime/bootstrap/v1/bootstrap.proto | Normalize enum spacing to match formatter output. |
| .github/workflows/ci.yml | Stop running make proto-fmt; rely on make check-protos to fail on formatting diffs. |
Comments suppressed due to low confidence (2)
Makefile:173
cidepends on bothcheckandcheck-protos, butchecknow already depends oncheck-protos. This causesmake cito run the protobuf format check twice. Consider removing the extracheck-protosdependency fromci(or dropping it fromcheckif you prefer it only in CI) to avoid redundant work.
This issue also appears on line 169 of the same file.
check: check-protos ## run all linters
@echo "$(WHALE) $@"
GOGC=75 golangci-lint run
ci: check binaries check-protos coverage ## to be used by the CI
Makefile:171
- Now that
checkdepends oncheck-protos, proto formatting failures will surface duringmake check, butcheck-protoscurrently prints "please run 'make protos'" on failure.make protosdoes not runbuf format --write, so this guidance won’t fix formatting-only failures. Consider updating the failure message (or theprotostarget) so it directs users tomake proto-fmt/buf formatwhen formatting is the issue.
check: check-protos ## run all linters
@echo "$(WHALE) $@"
GOGC=75 golangci-lint run
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| http://www.apache.org/licenses/LICENSE-2.0 |
|
d45ff4d to
55fe1ef
Compare
55fe1ef to
57a7fec
Compare
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
| check-protos: ## check if protobufs needs to be generated again | ||
| @echo "$(WHALE) $@" | ||
| @(cd api && buf format --diff --exit-code --exclude-path vendor \ | ||
| $(if $(GITHUB_ACTIONS),--error-format github-actions)) || \ | ||
| (echo "$(ONI) please run 'make protos' when making changes to proto files" && false) | ||
| (echo "$(ONI) please run 'make proto-fmt' to fix formatting or 'make protos' to regenerate proto files" && false) |
Signed-off-by: Sergey Kanzhelev <[email protected]>
57a7fec to
7f10e9e
Compare
|
now should be fixed, updated vendored files formatting as well |
|
test failures looks unrelated |
|
Ah! This explains what I saw in #12913 (comment) |
|
(restarted CI) |
Did you change the vendored files? Or were they previously already changed and different from the upstream versions? |
Now they all in-sync. They were in-sync but not linted before and my previous commit was only changed original files. Now I fixed both and tests should pass |
|
Having looked more closely: the only files that were modified in
These are all part of the |
This was counterproductive to format files before checking. Now lining errors will actually be checked