Skip to content

feat(dotnet-sdk): add write conflict resolution options#644

Merged
evansims merged 7 commits intomainfrom
feat/dotnet/write-conflict-options
Oct 21, 2025
Merged

feat(dotnet-sdk): add write conflict resolution options#644
evansims merged 7 commits intomainfrom
feat/dotnet/write-conflict-options

Conversation

@evansims
Copy link
Copy Markdown
Contributor

@evansims evansims commented Oct 16, 2025

Description

Implements support for write conflict resolution options introduced in OpenFGA v1.10.0, allowing users to control behavior for duplicate writes and missing deletes.

  • Added OnDuplicateWrites enum: Error (default) | Ignore - controls behavior when writing a tuple that already exists
  • Added OnMissingDeletes enum: Error (default) | Ignore - controls behavior when deleting a non-existent tuple
  • Added ConflictOptions class with properties for both enum types
  • Exposed via ClientWriteOptions.Conflict property
  • Default values (Error) are explicitly sent to the API when not specified by the user

Usage Example:

var options = new ClientWriteOptions {
  Conflict = new ConflictOptions {
      OnDuplicateWrites = OnDuplicateWrites.Ignore,
      OnMissingDeletes = OnMissingDeletes.Ignore
  }
};

await fgaClient.Write(body, options);

References

Generates → openfga/dotnet-sdk#136
Issue → #610

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • New Features

    • Added conflict resolution options for write operations
    • Added per-request headers support for API operations
  • Bug Fixes

    • Corrected typo in changelog
  • Documentation

    • Added guide for configuring write conflict handling
    • Updated initialization and usage documentation examples

@evansims evansims added the enhancement New feature or request label Oct 16, 2025
@evansims evansims requested a review from a team as a code owner October 16, 2025 23:13
@evansims evansims added the dotnet-sdk Affects the C#/DotNet SDK label Oct 16, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 16, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

The PR introduces write conflict resolution options for the .NET client, adding enums for duplicate-write and missing-delete behaviors, interfaces for conflict configuration, and client-side mapping helpers that propagate conflict settings through API requests. Additionally, per-request header support is expanded, with comprehensive tests validating header precedence, conflict option propagation, and reserved header protection.

Changes

Cohort / File(s) Summary
Model Additions
config/clients/dotnet/template/Client/Model/ClientWriteOptions.mustache
Adds OnDuplicateWrites and OnMissingDeletes enums; introduces IConflictOptions interface and ConflictOptions class with corresponding properties; extends IClientWriteOptions and ClientWriteOptions with Conflict and Headers properties.
Client Implementation
config/clients/dotnet/template/Client/Client.mustache
Adds private static mapping helpers MapOnDuplicateWrites() and MapOnMissingDeletes() to convert conflict enums; updates write paths to apply mapped conflict behavior and header extraction to API requests via ExtractHeaders(options) and conflict inclusion in clientWriteOpts.
Test Suite
config/clients/dotnet/template/OpenFgaClientTests.mustache
Removes response captures in existing Write test scaffolds; introduces extensive new tests for per-request conflict options propagation, per-request header handling across multiple operations, header precedence validation (per-request > OAuth > default), reserved header protection, concurrent header isolation, and Content-Type override prevention.
Documentation
config/clients/dotnet/CHANGELOG.md.mustache, config/clients/dotnet/template/README_calling_api.mustache, config/clients/dotnet/template/README_initializing.mustache
Fixes typo ("overiding" → "overriding"); adds conflict options documentation section with code samples; updates client instantiation example to use template placeholder.

Sequence Diagram

sequenceDiagram
    participant Client as Client Code
    participant SDK as {{appShortName}}Client
    participant Mapper as Mapping Helpers
    participant API as OpenFgaApi

    Client->>SDK: Write(request, options: ClientWriteOptions)
    Note over SDK: Extract headers via ExtractHeaders(options)
    SDK->>Mapper: MapOnDuplicateWrites(options?.Conflict?.OnDuplicateWrites)
    Mapper-->>SDK: WriteRequestWrites.OnDuplicateEnum
    SDK->>Mapper: MapOnMissingDeletes(options?.Conflict?.OnMissingDeletes)
    Mapper-->>SDK: WriteRequestDeletes.OnMissingEnum
    Note over SDK: Build clientWriteOpts with<br/>Conflict = options?.Conflict<br/>Headers from ExtractHeaders(options)
    SDK->>API: Call API with mapped conflict behavior<br/>and propagated headers
    API-->>SDK: Response
    SDK-->>Client: Result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

The changes span multiple files with new API surface additions (enums, interfaces, classes) and internal logic updates for conflict mapping and header propagation. While individual changes follow a consistent pattern, the extent of new test coverage and cross-file coordination requires moderate review attention to validate correctness and completeness of the implementation.

Possibly related issues

Possibly related PRs

Suggested reviewers

  • sergiught
  • SoulPancake

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "feat(dotnet-sdk): add write conflict resolution options" directly and accurately describes the primary change throughout the changeset. The core modifications focus on introducing write conflict resolution capabilities via new enums (OnDuplicateWrites, OnMissingDeletes), a ConflictOptions class, and their integration into ClientWriteOptions, along with corresponding client-side implementation and extensive test coverage. The title is specific, concise, and follows conventional commit format without vague terminology or misleading content.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
config/clients/dotnet/CHANGELOG.md.mustache (1)

10-10: Fix typo in “overiding”.

Please correct the spelling to “overriding” for clarity.

Apply this diff:

-  - add header validation to prevent overiding of reserved headers
+  - add header validation to prevent overriding of reserved headers
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75dbea2 and c4a94f7.

📒 Files selected for processing (28)
  • config/clients/dotnet/CHANGELOG.md.mustache (7 hunks)
  • config/clients/dotnet/config.overrides.json (1 hunks)
  • config/clients/dotnet/template/Client/Client.mustache (26 hunks)
  • config/clients/dotnet/template/Client/ClientConfiguration.mustache (4 hunks)
  • config/clients/dotnet/template/Client/Model/ClientBatchCheckOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientCheckOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientConsistencyOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientCreateStoreOptions.mustache (1 hunks)
  • config/clients/dotnet/template/Client/Model/ClientExpandOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientListObjectsOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientListRelationsOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientListStoresOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientListUsersOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientReadAssertionsOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientReadAuthorizaionModelOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientReadAuthorizaionModelsOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientReadChangesOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientReadOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientRequestOptions.mustache (1 hunks)
  • config/clients/dotnet/template/Client/Model/ClientRequestOptsWithStoreId.mustache (1 hunks)
  • config/clients/dotnet/template/Client/Model/ClientWriteAssertionsOptions.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Model/ClientWriteOptions.mustache (3 hunks)
  • config/clients/dotnet/template/Client_ApiClient.mustache (4 hunks)
  • config/clients/dotnet/template/OpenFgaClientTests.mustache (6 hunks)
  • config/clients/dotnet/template/README_calling_api.mustache (1 hunks)
  • config/clients/dotnet/template/README_initializing.mustache (1 hunks)
  • config/clients/dotnet/template/api.mustache (3 hunks)
  • config/clients/dotnet/template/modelRequestOptions.mustache (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
config/**/*.mustache

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Validate mustache syntax and variable references across all template files, including CHANGELOG.md.mustache

Files:

  • config/clients/dotnet/template/README_initializing.mustache
  • config/clients/dotnet/template/Client/Model/ClientRequestOptsWithStoreId.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadChangesOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadAssertionsOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientBatchCheckOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientExpandOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadAuthorizaionModelsOptions.mustache
  • config/clients/dotnet/template/README_calling_api.mustache
  • config/clients/dotnet/template/Client/Model/ClientWriteAssertionsOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientWriteOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientListUsersOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientCreateStoreOptions.mustache
  • config/clients/dotnet/template/modelRequestOptions.mustache
  • config/clients/dotnet/template/api.mustache
  • config/clients/dotnet/template/Client/Model/ClientConsistencyOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientListStoresOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientListRelationsOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientListObjectsOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadAuthorizaionModelOptions.mustache
  • config/clients/dotnet/template/Client_ApiClient.mustache
  • config/clients/dotnet/template/Client/ClientConfiguration.mustache
  • config/clients/dotnet/template/Client/Model/ClientCheckOptions.mustache
  • config/clients/dotnet/CHANGELOG.md.mustache
  • config/clients/dotnet/template/OpenFgaClientTests.mustache
  • config/clients/dotnet/template/Client/Model/ClientRequestOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadOptions.mustache
  • config/clients/dotnet/template/Client/Client.mustache
config/**/*.{json,mustache}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Never hardcode API keys or credentials in configuration or template files

Files:

  • config/clients/dotnet/template/README_initializing.mustache
  • config/clients/dotnet/template/Client/Model/ClientRequestOptsWithStoreId.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadChangesOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadAssertionsOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientBatchCheckOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientExpandOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadAuthorizaionModelsOptions.mustache
  • config/clients/dotnet/template/README_calling_api.mustache
  • config/clients/dotnet/template/Client/Model/ClientWriteAssertionsOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientWriteOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientListUsersOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientCreateStoreOptions.mustache
  • config/clients/dotnet/template/modelRequestOptions.mustache
  • config/clients/dotnet/template/api.mustache
  • config/clients/dotnet/template/Client/Model/ClientConsistencyOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientListStoresOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientListRelationsOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientListObjectsOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadAuthorizaionModelOptions.mustache
  • config/clients/dotnet/template/Client_ApiClient.mustache
  • config/clients/dotnet/template/Client/ClientConfiguration.mustache
  • config/clients/dotnet/template/Client/Model/ClientCheckOptions.mustache
  • config/clients/dotnet/CHANGELOG.md.mustache
  • config/clients/dotnet/config.overrides.json
  • config/clients/dotnet/template/OpenFgaClientTests.mustache
  • config/clients/dotnet/template/Client/Model/ClientRequestOptions.mustache
  • config/clients/dotnet/template/Client/Model/ClientReadOptions.mustache
  • config/clients/dotnet/template/Client/Client.mustache
config/clients/*/config.overrides.json

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

config/clients/*/config.overrides.json: Always update the packageVersion in each language-specific config.overrides.json when making version changes
Maintain FOSSA compliance notice IDs in each language’s config.overrides.json

Files:

  • config/clients/dotnet/config.overrides.json
config/{common/config.base.json,clients/*/config.overrides.json}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Ensure consistent versioning across base and language override configuration files to avoid version conflicts

Files:

  • config/clients/dotnet/config.overrides.json
🧠 Learnings (1)
📚 Learning: 2025-08-12T14:18:58.827Z
Learnt from: rhamzeh
PR: openfga/sdk-generator#573
File: config/clients/java/config.overrides.json:184-191
Timestamp: 2025-08-12T14:18:58.827Z
Learning: In the OpenFGA SDK generator, templates are inherited from the upstream OpenAPI Generator (openapitools/openapi-generator-cli). Only custom or modified templates need to be explicitly defined in the config overrides files. Base templates like `settings.gradle.mustache` are provided by the upstream generator and don't require override mappings.

Applied to files:

  • config/clients/dotnet/config.overrides.json
🪛 Gitleaks (8.28.0)
config/clients/dotnet/template/OpenFgaClientTests.mustache

[high] 2867-2867: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-and-test-java-sdk
  • GitHub Check: build-and-test-dotnet-sdk
  • GitHub Check: build-and-test-go-sdk
🔇 Additional comments (12)
config/clients/dotnet/template/Client/Model/ClientListObjectsOptions.mustache (1)

1-23: LGTM! Header support correctly implemented.

The changes properly add header support to ClientListObjectsOptions:

  • Templated namespace using {{packageName}} provides appropriate flexibility
  • System.Collections.Generic import correctly supports the new IDictionary property
  • Headers property follows C# conventions with nullable type and auto-property syntax
  • <inheritdoc /> comment assumes the parent interface hierarchy (likely IClientRequestOptionsWithAuthZModelIdAndConsistency) defines the Headers property, which aligns with the broader refactoring described in the PR

The implementation is consistent with the pattern being applied across multiple option classes in this PR.

config/clients/dotnet/template/Client/Model/ClientExpandOptions.mustache (3)

3-3: LGTM: Proper template parameterization.

The change from hardcoded namespace to templated {{packageName}}.Model improves flexibility and follows mustache templating best practices.


4-4: LGTM: Required import for IDictionary.

The import is necessary for the new Headers property and is correctly placed.


21-22: The Headers property is correctly defined in the parent interface hierarchy through IClientRequestOptions, which is accessible via the inheritance chain: IClientExpandOptionsIClientRequestOptionsWithAuthZModelIdAndConsistencyIClientRequestOptionsWithAuthZModelIdIClientRequestOptionsWithStoreIdIClientRequestOptions.

All four properties in ClientExpandOptions class—StoreId, AuthorizationModelId, Consistency, and Headers—are properly defined in their respective parent interfaces and use valid inheritdoc references:

  • StoreId from StoreIdOptions
  • AuthorizationModelId from AuthorizationModelIdOptions
  • Consistency from IClientConsistencyOptions
  • Headers from IClientRequestOptions

The code is correct.

config/clients/dotnet/template/Client/Model/ClientReadChangesOptions.mustache (1)

3-4: LGTM! Headers property follows the established pattern.

The addition of the Headers property with IDictionary<string, string>? type and the corresponding using System.Collections.Generic; directive aligns with the broader header support introduced across client option models.

Also applies to: 23-25

config/clients/dotnet/template/Client/Model/ClientConsistencyOptions.mustache (1)

3-3: LGTM! Namespace migration is appropriate.

The change from OpenFga.Sdk.Model to {{packageName}}.Model aligns with the template-driven package scoping approach used across the codebase.

config/clients/dotnet/template/Client/Model/ClientListRelationsOptions.mustache (1)

3-4: LGTM! Consistent header support implementation.

The namespace change and Headers property addition follow the same pattern as other client option models in this PR.

Also applies to: 25-28

config/clients/dotnet/template/README_initializing.mustache (1)

97-136: LGTM! Comprehensive header documentation.

The documentation for custom headers is clear and well-structured, covering both default headers (client-level) and per-request headers with practical code examples.

config/clients/dotnet/template/Client/Model/ClientListUsersOptions.mustache (1)

3-4: LGTM! Consistent implementation.

The namespace migration and Headers property addition follow the established pattern across client option models.

Also applies to: 20-23

config/clients/dotnet/template/Client/Model/ClientReadAuthorizaionModelOptions.mustache (1)

3-4: LGTM! Headers property addition is consistent.

The addition of the Headers property and the corresponding using directive follows the same pattern as other client option models.

Also applies to: 20-22

config/clients/dotnet/template/README_calling_api.mustache (1)

321-358: LGTM! Clear conflict options documentation.

The documentation section effectively explains the new conflict handling options for write operations, with a comprehensive code example demonstrating how to configure OnDuplicateWrites and OnMissingDeletes behavior.

config/clients/dotnet/template/Client/Model/ClientBatchCheckOptions.mustache (1)

3-4: LGTM! Consistent with the pattern.

The namespace migration and Headers property addition are consistent with the broader header support implementation across client option models.

Also applies to: 29-31

Copilot AI review requested due to automatic review settings October 16, 2025 23:53
@evansims evansims changed the base branch from main to feat/dotnet/per-request-custom-headers October 16, 2025 23:54
Copy link
Copy Markdown
Contributor

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

Adds per-request custom headers support and introduces write conflict resolution options for the .NET SDK templates.

  • Exposes per-request headers via IRequestOptions at API level and IClientRequestOptions for high-level client options; validates and merges with defaults.
  • Implements ConflictOptions with OnDuplicateWrites and OnMissingDeletes for write operations and ensures defaults are explicitly sent.
  • Updates tests and docs to cover header behavior and conflict options.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
config/clients/dotnet/template/modelRequestOptions.mustache Introduces IRequestOptions/RequestOptions for per-request headers at API layer.
config/clients/dotnet/template/api.mustache Adds options parameter (headers) to all API methods and forwards headers to ApiClient.
config/clients/dotnet/template/Client_ApiClient.mustache Merges OAuth and per-request headers, adds header-building/validation.
config/clients/dotnet/template/Client/Client.mustache Extracts headers from options, passes to API, and maps conflict options for write calls.
config/clients/dotnet/template/Client/Model/* Adds Headers to all client options; adds ConflictOptions and enums for write behavior.
config/clients/dotnet/template/OpenFgaClientTests.mustache Adds comprehensive tests for headers and write conflict options.
config/clients/dotnet/template/README_*.mustache Documents default and per-request headers and write conflict options.
config/clients/dotnet/config.overrides.json Maps new RequestOptions template to generated output.
config/clients/dotnet/CHANGELOG.md.mustache Notes new features and breaking changes, incl. header support and options rename.

Copy link
Copy Markdown
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@evansims evansims requested a review from Copilot October 17, 2025 01:54
@evansims
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 17, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
config/clients/dotnet/template/OpenFgaClientTests.mustache (1)

2900-2904: Use the correct options type for ReadLatestAuthorizationModel headers [duplicate of prior review]

Pass ClientReadAuthorizationModelsOptions (or the interface it implements) instead of ClientWriteOptions to match the method’s expected options type.

Apply:

-        var options = new ClientWriteOptions {
+        var options = new ClientReadAuthorizationModelsOptions {
             Headers = new Dictionary<string, string> {
                 { "X-Latest-Model", "latest-xyz" }
             }
         };
🧹 Nitpick comments (3)
config/clients/dotnet/CHANGELOG.md.mustache (1)

11-15: Clarify version requirement and explicit defaults in changelog

Suggest adding:

  • Requires OpenFGA v1.10.0+.
  • SDK explicitly sends Error defaults when options are not specified (as implemented/tests assert).

Example:

  • Requires OpenFGA v1.10.0+.
  • When not specified, the SDK explicitly sends Error for both behaviors.
config/clients/dotnet/template/Client/Client.mustache (1)

227-239: Mapping helpers default to Error (as desired)

Null → Error behavior matches API expectations and tests. Optionally, consider a switch expression for readability.

config/clients/dotnet/template/OpenFgaClientTests.mustache (1)

2202-2203: Avoid hard-coding OpenFgaClient in a template

Use {{appShortName}}Client consistently to keep the template resilient to naming changes and aligned with the rest of the file.

Example fix (apply to each occurrence):

-var fgaClient = new OpenFgaClient(_config, httpClient);
+var fgaClient = new {{appShortName}}Client(_config, httpClient);

Also applies to: 2251-2252, 2300-2301, 2349-2350, 2398-2399, 2460-2461, 2535-2536, 2596-2597, 2655-2656

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4a94f7 and c0cc490.

📒 Files selected for processing (4)
  • config/clients/dotnet/CHANGELOG.md.mustache (2 hunks)
  • config/clients/dotnet/template/Client/Client.mustache (3 hunks)
  • config/clients/dotnet/template/OpenFgaClientTests.mustache (5 hunks)
  • config/clients/dotnet/template/README_initializing.mustache (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/clients/dotnet/template/README_initializing.mustache
🔇 Additional comments (5)
config/clients/dotnet/CHANGELOG.md.mustache (1)

10-10: Reserved headers validation entry looks good

Spelling fix and intent are correct.

config/clients/dotnet/template/Client/Client.mustache (2)

370-379: Conflict options correctly propagated into WriteRequest

Writes/Deletes map OnDuplicate/OnMissing via the helpers. Defaults handled when null. LGTM.


395-400: Non-transaction chunk path preserves per-request StoreId, headers, and conflict

Using options?.StoreId ?? StoreId, carrying Headers and Conflict fixes the previously flagged StoreId override issue in chunked writes. Good catch.

config/clients/dotnet/template/OpenFgaClientTests.mustache (2)

1015-1017: Minor test cleanup: LGTM

Switching to fire-and-forget Write calls removes unused variables; no behavior change.

Also applies to: 1061-1063, 1114-1116


2177-2677: Conflict options tests are comprehensive

Good coverage for Ignore/Error behaviors, combinations, non-transaction chunking, and defaulting to Error when unspecified. Assertions reflect the wire format correctly.

Copy link
Copy Markdown
Contributor

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

@evansims evansims marked this pull request as draft October 17, 2025 02:27
@evansims evansims force-pushed the feat/dotnet/write-conflict-options branch from 53921d5 to 8380689 Compare October 21, 2025 00:22
@evansims evansims marked this pull request as ready for review October 21, 2025 00:26
ewanharris
ewanharris previously approved these changes Oct 21, 2025
SoulPancake
SoulPancake previously approved these changes Oct 21, 2025
Copy link
Copy Markdown
Member

@SoulPancake SoulPancake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

Base automatically changed from feat/dotnet/per-request-custom-headers to main October 21, 2025 15:02
@evansims evansims dismissed stale reviews from SoulPancake and ewanharris October 21, 2025 15:02

The base branch was changed.

@evansims evansims force-pushed the feat/dotnet/write-conflict-options branch from 70f2692 to 200396c Compare October 21, 2025 15:28
@evansims evansims enabled auto-merge October 21, 2025 15:54
@evansims evansims added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit 95199ec Oct 21, 2025
15 checks passed
@evansims evansims deleted the feat/dotnet/write-conflict-options branch October 21, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dotnet-sdk Affects the C#/DotNet SDK enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All SDKs] Add on_duplicate/on_missing options support for Write operations

4 participants