Skip to content

feat: add aks-live-patching module with live patching service proto#8868

Open
YaoC wants to merge 2 commits into
mainfrom
chyao/aks-live-patching
Open

feat: add aks-live-patching module with live patching service proto#8868
YaoC wants to merge 2 commits into
mainfrom
chyao/aks-live-patching

Conversation

@YaoC

@YaoC YaoC commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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 #

Copilot AI review requested due to automatic review settings July 8, 2026 22:11

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

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 LivePatchingService protobuf definition (GetComponentConfig) and commits generated Go + gRPC stubs.
  • Adds a Docker-based protoc tool 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

Comment thread aks-live-patching/Makefile
Comment thread aks-live-patching/Makefile

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 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

Comment thread aks-live-patching/Makefile
Copilot AI review requested due to automatic review settings July 17, 2026 16:31

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 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

Comment thread aks-live-patching/Makefile Outdated
Comment thread aks-live-patching/go.mod Outdated
Comment thread aks-live-patching/proto/akslivepatching/v1/live_patching.proto
Copilot AI review requested due to automatic review settings July 17, 2026 17:12

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 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

Comment on lines +1 to +4
# 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
Copilot AI review requested due to automatic review settings July 17, 2026 17:22
@YaoC
YaoC force-pushed the chyao/aks-live-patching branch from b97c779 to db12a63 Compare July 17, 2026 17:22

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 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

Comment on lines +14 to +17
.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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we dont have docker...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maye we do during build...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes we do. aks-node-controller proto also uses docker

Comment thread aks-live-patching/go.mod
@@ -0,0 +1,15 @@
module github.com/Azure/agentbaker/aks-live-patching

go 1.25.11

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this will need msft-go... have we consider moving to managed-dalec ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I believe we are already using msft-go because there is
sudo apt-get -y install msft-golang in hack/setup_golang.sh?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think whether this is the case should depend on the one using this module?

@Devinwong

Copy link
Copy Markdown
Collaborator

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.

@Devinwong

Copy link
Copy Markdown
Collaborator

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
Go unit test path (workflow and/or root Makefile target chain) so go build + go test run in this module too.
This keeps quality gates consistent with existing module patterns before AKS-RP starts consuming it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 17, 2026 22:09
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed⏩ skippedJul 17, 2026, 10:17 PM

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 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-lint runs buf breaking --against '../.git#branch=main,subdir=aks-live-patching'. In this PR, main won’t have the aks-live-patching subdir yet, so this command will fail for anyone running make proto-generate before 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.

@YaoC

YaoC commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Added the buf skip breaking label intentionally. This PR introduces the new aks-live-patching proto module, so it doesn't exist yet on the base branch (main). Buf's breaking-change check compares against the base commit, finds no .proto files there, and fails with Module "path: "aks-live-patching"" had no .proto files.

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, main will contain the protos, and breaking-change detection runs normally on every future PR automatically — no follow-up cleanup needed.

@YaoC

YaoC commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@djsly @Devinwong thanks for reviewing my PR! addressed your comments, PTAL

@YaoC
YaoC enabled auto-merge (squash) July 17, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants