Skip to content

Conversation

@markkeshian
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a 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 BulkCreateBillingGroup RPC documentation to specify CSV-based bulk creation.
  • Replaced BulkCreateBillingGroupRequest from 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.

Comment on lines +3434 to +3441
// 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;
Copy link

Copilot AI Jan 30, 2026

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.

Suggested change
// 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;

Copilot uses AI. Check for mistakes.
// 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.
Copy link

Copilot AI Jan 30, 2026

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.

Suggested change
// 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 uses AI. Check for mistakes.
message BulkCreateBillingGroupRequest {
// Required. The list of billing group to create.
repeated CreateBillingGroupRequest request = 1;
// Required. The CSV file content as bytes.
Copy link

Copilot AI Jan 30, 2026

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

Suggested change
// 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.

Copilot uses AI. Check for mistakes.
@tituscarl tituscarl merged commit 36a963b into main Jan 30, 2026
8 checks passed
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.

3 participants