-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1005,7 +1005,7 @@ service Billing { | |||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| // Create billing group in bulk | ||||||||||||||||||||||||||||||||||||||||||||||
| // Create billing group in bulk from CSV file | ||||||||||||||||||||||||||||||||||||||||||||||
| rpc BulkCreateBillingGroup(BulkCreateBillingGroupRequest) returns (stream BulkCreateBillingGroupResponse) { | ||||||||||||||||||||||||||||||||||||||||||||||
| option (google.api.http) = { | ||||||||||||||||||||||||||||||||||||||||||||||
| post: "/v1/billinggroups:bulkCreate" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -3431,8 +3431,14 @@ message SetChildBillingGroupInvoiceServiceDiscountsRequest { | |||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| message BulkCreateBillingGroupRequest { | ||||||||||||||||||||||||||||||||||||||||||||||
| // Required. The list of billing group to create. | ||||||||||||||||||||||||||||||||||||||||||||||
| repeated CreateBillingGroupRequest request = 1; | ||||||||||||||||||||||||||||||||||||||||||||||
| // 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. | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
| // Optional. Whether the CSV file has a header row. Defaults to true. | |
| // Optional. Whether the CSV file has a header row. Defaults to false. |
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; |
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.httpwithbody: "*"),bytes csvContentwill 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 likegoogle.api.HttpBodyif the intent is to accept raw CSV via REST).