Skip to content

Add throughputBucket support to Cosmos computation expressions - #20

Draft
xperiandri with Copilot wants to merge 2 commits into
mainfrom
copilot/support-throughput-bucket-operation-again
Draft

xperiandri with Copilot wants to merge 2 commits into
mainfrom
copilot/support-throughput-bucket-operation-again

Conversation

Copilot AI commented May 23, 2026 •

Copy link
Copy Markdown
Contributor

Azure Cosmos DB throughput buckets can be set per request, but the library’s computation expressions did not expose that capability. This change adds throughputBucket to the CE surface so request-level bucket selection can be composed the same way as the existing request options.

  • CE surface

    • Added throughputBucket custom operations to request-option-based builders:
      • create / createAndRead
      • replace / replaceAndRead
      • replaceConcurrenly / replaceConcurrenlyAndRead
      • upsert / upsertAndRead
      • upsertConcurrenly / upsertConcurrenlyAndRead
      • delete
      • read
      • readMany
      • patch / patchAndRead
  • Request option wiring

    • Added a shared internal helper that sets the Cosmos SDK RequestOptions.ThroughputBucket value across the supported request option types.
    • Builders that lazily create request options (delete, read, readMany) now initialize options when throughputBucket is specified.
  • Coverage

    • Added focused tests that verify each affected builder persists the configured throughput bucket onto its generated request options.

Example:

let operation =
    create<MyDocument> {
        item document
        partitionKey document.PartitionKey
        throughputBucket 3
    }

Copilot AI linked an issue May 23, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add throughput bucket operation on CEs Add throughputBucket support to Cosmos computation expressions May 23, 2026
Copilot AI requested a review from xperiandri May 23, 2026 18:26
@xperiandri
xperiandri force-pushed the main branch 2 times, most recently from 4e9ebae to 0eef905 Compare May 24, 2026 22:15
@xperiandri
xperiandri force-pushed the main branch 3 times, most recently from 9e0fa87 to 5c683fe Compare September 14, 2026 21:12
@xperiandri
xperiandri force-pushed the copilot/support-throughput-bucket-operation-again branch from 81750ee to 37a6c16 Compare October 17, 2026 23:38
@xperiandri
xperiandri force-pushed the copilot/support-throughput-bucket-operation-again branch 5 times, most recently from 9167818 to 9dd450e Compare October 18, 2026 22:28
@xperiandri
xperiandri force-pushed the copilot/support-throughput-bucket-operation-again branch from 9dd450e to b475716 Compare October 18, 2026 23:13

This branch has not been deployed

No deployments
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.

Support throughput bucket operation (parameter) on CEs

2 participants