Repository navigation
fix(sdk): use source_entity/target_entity in Python and Swift entity merge - #490
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
…merge POST /api/v1/graph/entities/merge (MergeEntitiesRequest) requires `source_entity` and `target_entity` (plus optional `merge_strategy`). The Python SDK sent `source`/`target` and Swift sent `source_name`/`target_name`, so the server rejected every merge. Python now serializes the request model with server aliases for both the sync and async resources; Swift sends the server field names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Entity merge requests use the wrong field names.
MergeEntitiesRequest(entities_types.rs) requiressource_entityandtarget_entity(optionalmerge_strategy). Python sentsource/target, Swift sentsource_name/target_name.Evidence
tests/test_entity_merge_body.py: before2 failed, after2 passed; suite627 passed, 33 skipped.testMergeEntitiesSendsServerFieldNames: before failure["target_name": "B", "source_name": "A"] is not equal to ["source_entity": "A", "target_entity": "B"]; afterswift test:Executed 241 tests, with 22 tests skipped and 0 failures.Change
Python:
MergeEntitiesRequestserializes with server aliases (source_entity,target_entity,merge_strategy), used by both sync and asyncmerge. Swift: body keys renamed.Verified / not verified
Type of change
Checklist
The author checklist items from the template are left for the human submitter to tick.
CI note
Security Auditfails onedgequake-mainitself (CI run 38326709329 at da1831c), and theLayer 1 — Static checksum guardjob failed on the recently merged #446. Neither touches SDK code; I did not investigate them here.