Skip to content

do not hide linitng errors - #13423

Merged
samuelkarp merged 1 commit into
containerd:mainfrom
SergeyKanzhelev:doNotHideProtoLinting
May 21, 2026
Merged

samuelkarp merged 1 commit into
containerd:mainfrom
SergeyKanzhelev:doNotHideProtoLinting

Conversation

@SergeyKanzhelev

Copy link
Copy Markdown
Contributor

This was counterproductive to format files before checking. Now lining errors will actually be checked

@SergeyKanzhelev

Copy link
Copy Markdown
Contributor Author

(side effect was leftover files after make check)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 check depend on check-protos (proto formatting diff check) instead of proto-fmt (auto-format).
  • Update several .proto files to match buf format output.
  • Remove make proto-fmt from 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

  • ci depends on both check and check-protos, but check now already depends on check-protos. This causes make ci to run the protobuf format check twice. Consider removing the extra check-protos dependency from ci (or dropping it from check if 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 check depends on check-protos, proto formatting failures will surface during make check, but check-protos currently prints "please run 'make protos'" on failure. make protos does not run buf format --write, so this guidance won’t fix formatting-only failures. Consider updating the failure message (or the protos target) so it directs users to make proto-fmt/buf format when 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.

Comment thread api/types/transfer/container.proto Outdated
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
@samuelkarp

Copy link
Copy Markdown
Member
   * d45ff4db "do not hide linitng errors" ... FAIL
    - FAIL - has whitespace errors. See `git show --check d45ff4dbf1e6206d655934d51f58c9d08354f7bd`.

@SergeyKanzhelev
SergeyKanzhelev force-pushed the doNotHideProtoLinting branch from d45ff4d to 55fe1ef Compare May 19, 2026 06:59
Copilot AI review requested due to automatic review settings May 20, 2026 00:23
@SergeyKanzhelev
SergeyKanzhelev force-pushed the doNotHideProtoLinting branch from 55fe1ef to 57a7fec Compare May 20, 2026 00:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.

Comment on lines +6 to 9
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

Comment thread Makefile
Comment on lines 195 to +199
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]>
@SergeyKanzhelev

Copy link
Copy Markdown
Contributor Author

now should be fixed, updated vendored files formatting as well

@SergeyKanzhelev

Copy link
Copy Markdown
Contributor Author

test failures looks unrelated

@thaJeztah

Copy link
Copy Markdown
Member

Ah! This explains what I saw in #12913 (comment)

@thaJeztah

Copy link
Copy Markdown
Member

(restarted CI)

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review May 20, 2026
@samuelkarp

Copy link
Copy Markdown
Member

updated vendored files formatting as well

Did you change the vendored files? Or were they previously already changed and different from the upstream versions?

@SergeyKanzhelev

Copy link
Copy Markdown
Contributor Author

updated vendored files formatting as well

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

@samuelkarp

Copy link
Copy Markdown
Member

Having looked more closely: the only files that were modified in vendor were:

  • vendor/github.com/containerd/containerd/api/runtime/bootstrap/v1/bootstrap.proto
  • vendor/github.com/containerd/containerd/api/types/transfer/container.proto
  • vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto

These are all part of the github.com/containerd/containerd/api module, which is also modified in this PR. They're showing up in vendor because we depend on it, and they must be modified here because we have a replace github.com/containerd/containerd/api => ./api rule in our go.mod.

@samuelkarp
samuelkarp added this pull request to the merge queue May 21, 2026
Merged via the queue into containerd:main with commit af9c93c May 21, 2026
125 of 129 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants