Skip to content

Add throughputBucket support to Cosmos computation expressions#20

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

Add throughputBucket support to Cosmos computation expressions#20
Copilot wants to merge 9 commits into
mainfrom
copilot/support-throughput-bucket-operation-again

Conversation

Copy link
Copy Markdown

Copilot AI commented May 23, 2026

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
    }

xperiandri and others added 7 commits May 23, 2026 17:23
* Added detailed project overview, solution structure, library list, and comprehensive F# coding guidelines.
* Included language preferences, nullable reference type handling, class instantiation rules, extension member patterns, naming conventions, and testing requirements.
* Replaced previous brief instructions with a thorough, structured guide.
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
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