feat: add aks-live-patching module with live patching service proto#8868
feat: add aks-live-patching module with live patching service proto#8868YaoC wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new aks-live-patching Go module that defines the Live Patching gRPC service API via protobufs and commits the generated Go bindings, along with local tooling (buf + protoc container) to format/lint/generate the protos.
Changes:
- Introduces
LivePatchingServiceprotobuf definition (GetComponentConfig) and commits generated Go + gRPC stubs. - Adds a Docker-based
protoctool image and a module Makefile that runs buf format/lint/breaking + codegen. - Adds a standalone Go module (
go.mod/go.sum) for the live-patching API package.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| aks-live-patching/protoc.Dockerfile | Builds a protoc tool image (Azure Linux base) with protoc + Go/gRPC plugins. |
| aks-live-patching/proto/akslivepatching/v1/live_patching.proto | Defines the akslivepatching.v1 protobuf API for live patching component config retrieval. |
| aks-live-patching/pkg/gen/akslivepatching/v1/live_patching.pb.go | Generated Go protobuf types for the new API. |
| aks-live-patching/pkg/gen/akslivepatching/v1/live_patching_grpc.pb.go | Generated Go gRPC client/server interfaces and service registration for the new API. |
| aks-live-patching/Makefile | Adds dockerized buf + protoc-based generation and lint/breaking targets. |
| aks-live-patching/go.mod | Declares the new submodule and its gRPC/protobuf dependencies. |
| aks-live-patching/go.sum | Adds module checksums for the new submodule dependencies. |
| aks-live-patching/buf.yaml | Configures buf module, lint, and breaking-change rules. |
Files not reviewed (2)
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching.pb.go: Generated file
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching_grpc.pb.go: Generated file
a4130fc to
d802cd6
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 8 changed files in this pull request and generated 2 comments.
Files not reviewed (2)
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching.pb.go: Generated file
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching_grpc.pb.go: Generated file
d802cd6 to
e61af39
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 8 changed files in this pull request and generated 3 comments.
Files not reviewed (2)
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching.pb.go: Generated file
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching_grpc.pb.go: Generated file
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 8 changed files in this pull request and generated 2 comments.
Files not reviewed (2)
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching.pb.go: Generated file
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching_grpc.pb.go: Generated file
| # Run buf in docker, mounting the full repo into the container | ||
| # Emulate running "buf" in the current directory | ||
| BUF = docker run --platform linux/amd64 --volume "$(CURDIR)/../:$(CURDIR)/../" --workdir $(CURDIR) bufbuild/buf:1.47.2 | ||
|
|
| } | ||
|
|
||
| func RegisterLivePatchingServiceServer(s grpc.ServiceRegistrar, srv LivePatchingServiceServer) { | ||
| // If the following call pancis, it indicates UnimplementedLivePatchingServiceServer was |
b97c779 to
db12a63
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 8 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching.pb.go: Generated file
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching_grpc.pb.go: Generated file
| .PHONY: proto-lint | ||
| proto-lint: | ||
| @($(BUF) lint) | ||
| @($(BUF) breaking --against '../.git#branch=main,subdir=aks-live-patching') |
| # Run buf in docker, mounting the full repo into the container | ||
| # Emulate running "buf" in the current directory | ||
| BUF_VERSION = 1.71.0 | ||
| BUF = docker run --rm --platform linux/amd64 --volume "$(CURDIR)/../:$(CURDIR)/../" --workdir $(CURDIR) bufbuild/buf:$(BUF_VERSION) |
There was a problem hiding this comment.
yes we do. aks-node-controller proto also uses docker
| @@ -0,0 +1,15 @@ | |||
| module github.com/Azure/agentbaker/aks-live-patching | |||
|
|
|||
| go 1.25.11 | |||
There was a problem hiding this comment.
I think this will need msft-go... have we consider moving to managed-dalec ?
There was a problem hiding this comment.
I believe we are already using msft-go because there is
sudo apt-get -y install msft-golang in hack/setup_golang.sh?
There was a problem hiding this comment.
I think whether this is the case should depend on the one using this module?
|
One gap vs existing aks-node-controller pattern: this PR adds a new proto module but doesn’t wire it into .github/workflows/buf.yaml. Please add aks-live-patching/proto/** and aks-live-patching/buf.yaml to workflow triggers, and add a Buf run for aks-live-patching (same pattern as aks-node-controller: read BUF_VERSION from module Makefile + input: aks-live-patching). Otherwise proto lint/breaking checks won’t run for this new module. |
|
Another parity gap: aks-live-patching is a new Go submodule but current CI wiring only explicitly covers existing modules (e.g. aks-node-controller). Please add aks-live-patching to repo Go CI coverage: golangci-lint workflow matrix |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 12 changed files in this pull request and generated no new comments.
Files not reviewed (2)
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching.pb.go: Generated file
- aks-live-patching/pkg/gen/akslivepatching/v1/live_patching_grpc.pb.go: Generated file
Comments suppressed due to low confidence (3)
aks-live-patching/Makefile:3
- BUF_VERSION is duplicated here but the repo’s Buf CI workflow extracts the version from aks-node-controller/Makefile. If these ever drift, local
make proto-*will run a different buf version than CI, leading to inconsistent formatting/linting results. Consider deriving BUF_VERSION from the same source as CI.
BUF_VERSION = 1.71.0
aks-live-patching/Makefile:17
proto-lintrunsbuf breaking --against '../.git#branch=main,subdir=aks-live-patching'. In this PR,mainwon’t have theaks-live-patchingsubdir yet, so this command will fail for anyone runningmake proto-generatebefore the PR is merged. Guard the breaking check so it only runs when the baseline exists.
proto-lint:
@($(BUF) lint)
@($(BUF) breaking --against '../.git#branch=main,subdir=aks-live-patching')
aks-live-patching/pkg/gen/akslivepatching/v1/live_patching_grpc.pb.go:85
- Typo in generated comment: “pancis” should be “panics”. Even though this is generated code, this typo is newly introduced in the PR and can be corrected to avoid confusion when reading the file.
|
Added the Build, lint, and format all pass — only the breaking step is affected, and there's genuinely no baseline to compare against for a brand-new module. The label skips only the breaking check for this one PR. Once this merges, |
|
@djsly @Devinwong thanks for reviewing my PR! addressed your comments, PTAL |
What this PR does / why we need it:
add aks-live-patching module with live patching service proto
Which issue(s) this PR fixes:
Fixes #