-
Notifications
You must be signed in to change notification settings - Fork 91
feat: support write conflict options for SDKs #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughThe changes consolidate write and delete conflict handling by replacing separate Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Possibly related issues
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the conflict handling options for write and delete operations by consolidating separate writeOptions and deleteOptions into a unified conflictOptions structure. The property names are also updated from snake_case to camelCase for consistency.
- Renamed
writeOptions.on_duplicateanddeleteOptions.on_missingtoconflictOptions.onDuplicateWritesandconflictOptions.onMissingDeletes - Updated code generation for Go, .NET, Python, and Java SDKs to support the new conflict options
- Reordered imports to follow alphabetical ordering
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/components/Docs/SnippetViewer/WriteRequestViewer.tsx | Refactored conflict options interface and updated code generation for all SDK languages |
| docs/content/getting-started/update-tuples.mdx | Updated documentation examples to use new conflictOptions API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/components/Docs/SnippetViewer/WriteRequestViewer.tsx (2)
378-418: RPC implementation silently ignores conflictOptions.Similar to JS_SDK and CLI, the RPC case doesn't process conflict options. This is consistent with other unsupported languages but should be validated (see comment on JS_SDK implementation).
118-147: Add validation to warn when conflictOptions are used with unsupported languages (JS_SDK, CLI, RPC).The analysis confirms that conflictOptions are silently ignored for three languages: JS_SDK, CLI, and RPC. While CURL, GO_SDK, DOTNET_SDK, PYTHON_SDK, and JAVA_SDK properly handle conflictOptions, the component has no validation to alert developers when they attempt to use this feature with unsupported languages. The suggested validation should be added at the component entry point to prevent confusion.
docs/content/getting-started/update-tuples.mdx (1)
275-277: Clarify SDK support statement.The note says "this feature is only available on the API (v1.10.0). Supported SDKs will follow shortly after," but the examples immediately above and below show GO, .NET, Python, and Java SDKs as actively supported. This creates confusion about which SDKs actually support conflict options.
Consider updating the note to be more specific:
:::caution -At the moment, this feature is only available on the API (v1.10.0). Supported SDKs will follow shortly after. +This feature is available on the API (v1.10.0+) and supported in the Go, .NET, Python, and Java SDKs. JavaScript SDK and CLI support will be added in future releases. :::
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/content/getting-started/update-tuples.mdx(2 hunks)src/components/Docs/SnippetViewer/WriteRequestViewer.tsx(8 hunks)
⏰ 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). (5)
- GitHub Check: Cleanup artifacts
- GitHub Check: Test deployment
- GitHub Check: deploy-preview
- GitHub Check: Run Checks
- GitHub Check: markdown-link-check-md
🔇 Additional comments (8)
src/components/Docs/SnippetViewer/WriteRequestViewer.tsx (6)
28-31: LGTM! Clean consolidation of conflict handling options.The unified
conflictOptionsstructure withonDuplicateWritesandonMissingDeletesimproves the API design by grouping related configuration together.
89-91: LGTM! Correct mapping to REST API fields.The conflict options are properly mapped to the REST API's
on_duplicateandon_missingfields with appropriate optional chaining.Also applies to: 102-104
210-222: LGTM! Proper Go SDK enum mapping.The conflict options are correctly mapped to Go SDK enum constants with appropriate uppercase transformation.
285-301: LGTM! Proper .NET SDK PascalCase conversion.The conflict options are correctly mapped to .NET SDK enums with appropriate PascalCase transformation.
356-367: LGTM! Correct Python SDK enum mappings.The conflict options are properly mapped to Python SDK enum constants with appropriate uppercase transformation (once the syntax error on line 353 is fixed).
463-478: LGTM! Proper Java SDK enum mapping.The conflict options are correctly mapped to Java SDK enum constants with appropriate uppercase transformation.
docs/content/getting-started/update-tuples.mdx (2)
260-262: LGTM! Correct conflictOptions structure.The documentation examples properly demonstrate the new
conflictOptionsstructure withonDuplicateWritesandonMissingDeletes.Also applies to: 290-292
265-272: LGTM! Correct language filtering for conflict options.The documentation appropriately excludes JS_SDK and CLI from examples using conflict options, correctly reflecting their lack of support in the component implementation.
Also applies to: 297-304
007744f to
f716a6f
Compare
JS and CLI will be added when available
Co-authored-by: Copilot <[email protected]>
4d6fe55 to
d12f7aa
Compare
Description
Screen.Recording.2025-11-04.at.10.53.32.AM.mov
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit
Documentation
New Features