From 265ea95d04ddf31a3acf232631cf326e72bfdabc Mon Sep 17 00:00:00 2001 From: Volo Kluev Date: Wed, 29 Apr 2026 16:17:24 -0700 Subject: [PATCH 1/3] style: Format proto files with buf formatter Run buf format on all proto files to ensure consistent formatting across the codebase. Co-Authored-By: Claude Sonnet 4.5 --- .../v1/endpoint_get_billing_details.proto | 4 +- .../charge/v1/endpoint_list_charges.proto | 12 ++-- .../services/contract/v1/billing_config.proto | 6 +- .../v1/endpoint_create_contract.proto | 8 +-- .../contract/v1/endpoint_get_invoice.proto | 6 +- .../v1/endpoint_rollover_contract.proto | 12 ++-- .../v1/services/contract/v1/invoice.proto | 22 +++---- .../invoicer/v1/endpoint_generate_pdf.proto | 60 +++++++++---------- 8 files changed, 65 insertions(+), 65 deletions(-) diff --git a/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_billing_details.proto b/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_billing_details.proto index 44aa908b..fa164041 100644 --- a/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_billing_details.proto +++ b/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_billing_details.proto @@ -5,9 +5,9 @@ package sentry_protos.billing.v1.services.billing_details.v1; import "sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto"; message GetBillingDetailsRequest { - uint64 organization_id = 1; + uint64 organization_id = 1; } message GetBillingDetailsResponse { BillingDetails billing_details = 1; -} \ No newline at end of file +} diff --git a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_list_charges.proto b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_list_charges.proto index 33876b33..4fa90da4 100644 --- a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_list_charges.proto +++ b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_list_charges.proto @@ -3,17 +3,17 @@ syntax = "proto3"; package sentry_protos.billing.v1.services.charge.v1; message Charge { - uint64 amount_cents = 1; - bool paid = 2; - optional string failure_code = 3; + uint64 amount_cents = 1; + bool paid = 2; + optional string failure_code = 3; } // No pagination on this request because there are expected to be only a handful // of attempted charges per invoice. message ListChargesForInvoiceRequest { - uint64 invoice_id = 1; + uint64 invoice_id = 1; } message ListChargesForInvoiceResponse { - repeated Charge charges = 1; -} \ No newline at end of file + repeated Charge charges = 1; +} diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto b/proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto index 0dd66ee3..9adb30fc 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto @@ -51,9 +51,9 @@ message BillingConfig { BillingType billing_type = 1; // Remaining fields are deprecated - BillingChannel channel = 2 [deprecated=true]; - ExternalBillingProvider external_billing_provider = 3 [deprecated=true]; - Address address = 4 [deprecated=true]; + BillingChannel channel = 2 [deprecated = true]; + ExternalBillingProvider external_billing_provider = 3 [deprecated = true]; + Address address = 4 [deprecated = true]; // Use PricingConfig.billing_period_start_date and PricingConfig.billing_period_end_date Date contract_start_date = 5 [deprecated = true]; Date contract_end_date = 6 [deprecated = true]; diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto index 04fafe61..63d683cc 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto @@ -5,11 +5,11 @@ package sentry_protos.billing.v1.services.contract.v1; import "sentry_protos/billing/v1/services/contract/v1/pricing_config.proto"; message CreateContractRequest { - uint64 organization_id = 1; - string package_uid = 2; - repeated UserConfig user_configs = 3; + uint64 organization_id = 1; + string package_uid = 2; + repeated UserConfig user_configs = 3; } message CreateContractResponse { - uint64 id = 1; + uint64 id = 1; } diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_invoice.proto b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_invoice.proto index 9cb24a2e..15bf8a8a 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_invoice.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_invoice.proto @@ -5,9 +5,9 @@ package sentry_protos.billing.v1.services.contract.v1; import "sentry_protos/billing/v1/services/contract/v1/invoice.proto"; message GetInvoiceRequest { - uint64 invoice_id = 1; + uint64 invoice_id = 1; } message GetInvoiceResponse { - Invoice invoice = 1; -} \ No newline at end of file + Invoice invoice = 1; +} diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto index 25c394a7..7e39fcf7 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto @@ -8,13 +8,13 @@ import "sentry_protos/billing/v1/services/contract/v1/invoice.proto"; // Creates a new contract for a new billing period. Closes out the current contract by // creating an invoice and setting the last usage date message RolloverContractRequest { - uint64 contract_id = 1; - google.protobuf.Timestamp last_usage_ts = 2; - repeated InvoiceLineItem line_items = 3; + uint64 contract_id = 1; + google.protobuf.Timestamp last_usage_ts = 2; + repeated InvoiceLineItem line_items = 3; } message RolloverContractResponse { - uint64 invoice_id = 1; - bool needs_charge = 2; - uint64 amount_billed = 3; + uint64 invoice_id = 1; + bool needs_charge = 2; + uint64 amount_billed = 3; } diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/invoice.proto b/proto/sentry_protos/billing/v1/services/contract/v1/invoice.proto index 84ea0ac2..3742f26e 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/invoice.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/invoice.proto @@ -7,18 +7,18 @@ import "google/protobuf/timestamp.proto"; // This is not the same as LineItemDetails, it includes // items not related to the package such as tax. message InvoiceLineItem { - // Intentionally not a uint (some line items could be discounts) - int64 amount_cents = 1; - optional string description = 2; + // Intentionally not a uint (some line items could be discounts) + int64 amount_cents = 1; + optional string description = 2; } message Invoice { - uint64 invoice_id = 1; - repeated InvoiceLineItem line_items = 2; - // Not just a sum of line items since there may be credit applied - uint64 amount_billed = 3; - uint64 organization_id = 4; - bool paid = 5; - google.protobuf.Timestamp date_added = 6; - string guid = 7; + uint64 invoice_id = 1; + repeated InvoiceLineItem line_items = 2; + // Not just a sum of line items since there may be credit applied + uint64 amount_billed = 3; + uint64 organization_id = 4; + bool paid = 5; + google.protobuf.Timestamp date_added = 6; + string guid = 7; } diff --git a/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_generate_pdf.proto b/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_generate_pdf.proto index fe7dfe2f..9f84bd22 100644 --- a/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_generate_pdf.proto +++ b/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_generate_pdf.proto @@ -3,40 +3,40 @@ syntax = "proto3"; package sentry_protos.billing.v1.services.invoicer.v1; message GeneratePdfRequest { - uint64 invoice_id = 1; - string invoice_guid = 2; + uint64 invoice_id = 1; + string invoice_guid = 2; } message PdfData { - // Right-aligned lines drawn at the top of the page (e.g. company address - // and tax IDs). - repeated string header = 1; - - // Left column of pre-formatted text lines drawn below the header. - repeated string billing_lines = 2; - - // Right column below the header. Each entry renders as the `label` drawn - // in one text column and the corresponding `value` drawn in the next. - message LabeledLine { - string label = 1; - string value = 2; - } - repeated LabeledLine invoice_lines = 3; - - // Rows of the invoice line-item table. The first row is the header row - // ("Description" / "Amount"); every subsequent row has the same number of - // cells. Cells may contain reportlab markup (e.g. ,
, ) for - // multi-line/styled descriptions. - message TableRow { - repeated string cells = 1; - } - repeated TableRow table_data = 4; - - // Optional FTC disclaimer paragraph drawn below the table. - optional string disclaimer = 5; + // Right-aligned lines drawn at the top of the page (e.g. company address + // and tax IDs). + repeated string header = 1; + + // Left column of pre-formatted text lines drawn below the header. + repeated string billing_lines = 2; + + // Right column below the header. Each entry renders as the `label` drawn + // in one text column and the corresponding `value` drawn in the next. + message LabeledLine { + string label = 1; + string value = 2; + } + repeated LabeledLine invoice_lines = 3; + + // Rows of the invoice line-item table. The first row is the header row + // ("Description" / "Amount"); every subsequent row has the same number of + // cells. Cells may contain reportlab markup (e.g. ,
, ) for + // multi-line/styled descriptions. + message TableRow { + repeated string cells = 1; + } + repeated TableRow table_data = 4; + + // Optional FTC disclaimer paragraph drawn below the table. + optional string disclaimer = 5; } message GeneratePdfResponse { - PdfData pdf_data = 1; - string filename = 2; + PdfData pdf_data = 1; + string filename = 2; } From a4f7f08f205edc70d644faa560e7501f0c0c5fc0 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:18:19 +0000 Subject: [PATCH 2/3] chore: Regenerate Rust bindings --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 613ada8b..23fe7597 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,7 +717,7 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "sentry_protos" -version = "0.8.20" +version = "0.8.21" dependencies = [ "prost", "prost-types", From 25b487ce5af6041079489aaf58a7e09ea06f149c Mon Sep 17 00:00:00 2001 From: Volo Kluev Date: Wed, 29 Apr 2026 16:19:57 -0700 Subject: [PATCH 3/3] ci: Enable buf format checking in CI Enable format checking in the buf-checks job to ensure all proto files are properly formatted. This will reject PRs with unformatted proto files. Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2991fc54..3ff19f37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,12 +17,12 @@ jobs: - uses: bufbuild/buf-setup-action@35c243d7f2a909b1d4e40399b348a7fdab27d78d # v1.34.0 - - name: buf lint and breaking + - name: buf lint, format, and breaking uses: bufbuild/buf-action@91da6f6a1a2c877c182debad24ca0a8a9d848be7 # v1 with: lint: true breaking: true - format: false + format: true breaking_against: 'https://github.com/getsentry/sentry-protos.git#branch=main' codegen-rust: