-
Notifications
You must be signed in to change notification settings - Fork 1
bulk create biiling group handle csv #794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the BulkCreateBillingGroup API to accept billing group creation input via an uploaded CSV payload.
Changes:
- Updated
BulkCreateBillingGroupRPC documentation to specify CSV-based bulk creation. - Replaced
BulkCreateBillingGroupRequestfrom a repeated request list to CSV upload parameters (csvContent,delimiter,hasHeader).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Required. The CSV file content as bytes. | ||
| bytes csvContent = 1; | ||
|
|
||
| // Optional. The delimiter used in the CSV file. Defaults to comma (,). | ||
| string delimiter = 2; | ||
|
|
||
| // Optional. Whether the CSV file has a header row. Defaults to true. | ||
| bool hasHeader = 3; |
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BulkCreateBillingGroupRequest reuses field number 1 but changes its type/meaning from repeated CreateBillingGroupRequest request = 1 to bytes csvContent = 1. This is wire-incompatible: existing clients will still send length-delimited field 1 values that will now be interpreted as raw bytes (serialized sub-messages), likely causing CSV parsing failures. Keep the old field number/type (or reserve it) and introduce new CSV-related fields with new numbers, or use a oneof to support both formats without breaking existing clients.
| // Required. The CSV file content as bytes. | |
| bytes csvContent = 1; | |
| // Optional. The delimiter used in the CSV file. Defaults to comma (,). | |
| string delimiter = 2; | |
| // Optional. Whether the CSV file has a header row. Defaults to true. | |
| bool hasHeader = 3; | |
| // Supported input formats for bulk creation. | |
| oneof input { | |
| // Backward-compatible: list of individual create requests. | |
| repeated CreateBillingGroupRequest requests = 1; | |
| // Required. The CSV file content as bytes. | |
| bytes csvContent = 2; | |
| } | |
| // Optional. The delimiter used in the CSV file. Defaults to comma (,). | |
| string delimiter = 3; | |
| // Optional. Whether the CSV file has a header row. Defaults to true. | |
| bool hasHeader = 4; |
| // Optional. The delimiter used in the CSV file. Defaults to comma (,). | ||
| string delimiter = 2; | ||
|
|
||
| // Optional. Whether the CSV file has a header row. Defaults to true. |
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says hasHeader defaults to true, but in proto3 a plain bool defaults to false and you cannot detect “unset” vs “false” without presence. If you need a default of true, make this field optional bool hasHeader = 3; (and treat unset as true), or use google.protobuf.BoolValue, or update the documentation to reflect the actual default behavior.
| // Optional. Whether the CSV file has a header row. Defaults to true. | |
| // Optional. Whether the CSV file has a header row. Defaults to false. |
| message BulkCreateBillingGroupRequest { | ||
| // Required. The list of billing group to create. | ||
| repeated CreateBillingGroupRequest request = 1; | ||
| // Required. The CSV file content as bytes. |
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this RPC is exposed over HTTP/JSON (google.api.http with body: "*"), bytes csvContent will be base64-encoded in JSON requests. The field comment currently reads like raw CSV can be sent directly; consider clarifying the JSON/base64 requirement (and/or using a more upload-oriented pattern like google.api.HttpBody if the intent is to accept raw CSV via REST).
| // Required. The CSV file content as bytes. | |
| // Required. The CSV file content as bytes. | |
| // | |
| // Note: When this RPC is called over HTTP/JSON (for example, using | |
| // `google.api.http` with `body: "*"`) this field MUST be sent as a | |
| // base64-encoded string in the JSON request body, as per protobuf JSON | |
| // mapping rules for `bytes` fields. |
No description provided.