chore: librarian generate pull request: 20260302T222605Z#14108
chore: librarian generate pull request: 20260302T222605Z#14108
Conversation
There was a problem hiding this comment.
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.
| 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) | ||
| } |
There was a problem hiding this comment.
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() {}|
closing in favor of #13872 |
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;auditmanagerpbforgo_packagePiperOrigin-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