Skip to content

chore: librarian generate pull request: 20260302T222605Z#14108

Closed
hongalex wants to merge 1 commit intomainfrom
librarian-20260302T222605Z
Closed

chore: librarian generate pull request: 20260302T222605Z#14108
hongalex wants to merge 1 commit intomainfrom
librarian-20260302T222605Z

Conversation

@hongalex
Copy link
Copy Markdown
Member

@hongalex hongalex commented Mar 2, 2026

PR created by the Librarian CLI to generate Cloud Client Libraries code from protos.

BEGIN_COMMIT

BEGIN_NESTED_COMMIT
fix: Update existing packaging option cloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb for go_package

PiperOrigin-RevId: 875794180
Library-IDs: auditmanager
Source-link: googleapis/googleapis@9637e50b
END_NESTED_COMMIT

END_COMMIT

This pull request is generated with proto changes between
googleapis/googleapis@c99e8a29
(exclusive) and
googleapis/googleapis@9637e50b
(inclusive).

Librarian Version: v0.8.0
Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-go@sha256:19bb93e8f1f916c61b597db2bad65dc432f79baaabb210499d7d0e4ad1dffe29

@hongalex hongalex requested review from a team as code owners March 2, 2026 22:26
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is an automated update from the Librarian CLI, which corrects the Go package path for the Audit Manager API's protobuf definitions from apiv1main to apiv1. The changes are consistent across all relevant files, including client code, examples, and generated snippets. A new gRPC stub file has been added with the corrected package path. My review includes one suggestion on the newly generated gRPC server code to improve forward compatibility by enforcing the embedding of the unimplemented server struct, which has been retained as it aligns with general best practices.

Comment on lines +160 to +184
type AuditManagerServer interface {
// Enrolls the customer resource(folder/project/organization) to the audit
// manager service by creating the audit managers Service Agent in customers
// workload and granting required permissions to the Service Agent. Please
// note that if enrollment request is made on the already enrolled workload
// then enrollment is executed overriding the existing set of destinations.
EnrollResource(context.Context, *EnrollResourceRequest) (*Enrollment, error)
// Generates a demo report highlighting different responsibilities
// (Google/Customer/ shared) required to be fulfilled for the customer's
// workload to be compliant with the given standard.
GenerateAuditScopeReport(context.Context, *GenerateAuditScopeReportRequest) (*AuditScopeReport, error)
// Register the Audit Report generation requests and returns the OperationId
// using which the customer can track the report generation progress.
GenerateAuditReport(context.Context, *GenerateAuditReportRequest) (*longrunningpb.Operation, error)
// Lists audit reports in the selected parent scope
ListAuditReports(context.Context, *ListAuditReportsRequest) (*ListAuditReportsResponse, error)
// Get the overall audit report
GetAuditReport(context.Context, *GetAuditReportRequest) (*AuditReport, error)
// Get a resource along with its enrollment status.
GetResourceEnrollmentStatus(context.Context, *GetResourceEnrollmentStatusRequest) (*ResourceEnrollmentStatus, error)
// Fetches all resources under the parent along with their enrollment.
ListResourceEnrollmentStatuses(context.Context, *ListResourceEnrollmentStatusesRequest) (*ListResourceEnrollmentStatusesResponse, error)
// Gets controls needed to be implemented to be compliant to a standard.
ListControls(context.Context, *ListControlsRequest) (*ListControlsResponse, error)
}
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.

medium

The generated AuditManagerServer interface and UnimplementedAuditManagerServer struct are missing the mustEmbedUnimplementedAuditManagerServer() method. This method enforces embedding of the unimplemented server, which is a best practice for ensuring forward compatibility of Go gRPC servers. Its absence means that adding new RPCs could become a breaking change for server implementers.

This feature is standard in recent versions of protoc-gen-go-grpc. Please consider enabling it in the code generation process to improve API maintainability.

For example:

// In AuditManagerServer interface
	mustEmbedUnimplementedAuditManagerServer()

// In UnimplementedAuditManagerServer struct
func (UnimplementedAuditManagerServer) mustEmbedUnimplementedAuditManagerServer() {}

@hongalex
Copy link
Copy Markdown
Member Author

hongalex commented Mar 2, 2026

closing in favor of #13872

@hongalex hongalex closed this Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant