Follow the edge endpoint rename, and assert the wire names - #350
Merged
Conversation
The v4 contract publishes an edge type's endpoints as source and target, which is what v3's public API shipped and what the spec has always said. The DSL and its tests are held out of regeneration, so they kept the old names while the generated model moved. The existing test could not catch that. The generated model allows extra keys, so constructing it with a name the contract does not have is accepted and reads back fine; only serializing shows the name that reaches the API. A second test now pins the serialized form.
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.
Rationale
The v4 contract publishes an edge type's endpoints as
sourceandtarget— what v3's public API shipped, and what the spec has always specified. v4 had been publishing the internal persisted names. The ontology DSL and its tests are held out of regeneration by.fernignore, so they kept the old names while the generated model moved.Changes
source/target.Impact and risks
4.0.0-alpha.5train was cancelled at the production gate because of it — nothing published.extra="allow", soEdgeSourceTarget(source=…)is accepted even when the declared field issource_entity_type, stored as an extra, and reads back fine. Only serializing shows the name that reaches the API. Of the three SDKs, only TypeScript asserted the wire form, which is why only TypeScript failed — Python and Go reported clean while carrying the same defect.Invariants
None.
Required configs
None.