Accept v1beta3 relationship schemaVersion at registration - #1096
Accept v1beta3 relationship schemaVersion at registration#1096leecalcote wants to merge 1 commit into
Conversation
getEntity dispatched relationships only on the v1beta2 and v1alpha3 schema version strings, so a definition authored against the canonical v1beta3 construct published by meshery/schemas fell through to the default case and failed to register - in server seeding and in mesheryctl model import alike. Components and models in the same switch already accept both their legacy and current version strings. Accept relationships.meshery.io/v1beta3 in the relationship case, decoding into the same shape-compatible registration struct, and add a RelationshipSchemaVersionV1Beta3 constant beside the existing v1beta2 one. Cover acceptance of the new version and rejection of unknown versions in tests. Fixes #1095 Signed-off-by: Arjun Mehta <231106746+arjunmehta-git@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe relationship entity parser now accepts the ChangesRelationship schema support
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR enables registration of v1beta3 relationship definitions while preserving rejection of unknown versions, with no actionable merge-blocking risk remaining after normal checks and review. Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
The earlier wording claimed v1beta3-authored definitions are consumed the same way as v1beta2 today. Shape-wise that is true (the server bridges registered definitions for the policy engine), but meshkit's registration switch accepts only v1beta2/v1alpha3 relationship documents, so a v1beta3 file fails to register at all - in server seeding and mesheryctl model import alike. meshery/meshkit#1096 adds the missing case (issue meshery/meshkit#1095). State the gate precisely everywhere the version guidance appears: author against v1beta3, declare v1beta2 for anything that must register on current servers. Also fold in skill-review feedback: trigger phrases and the file-path pattern move into the skill's frontmatter description, and the combo table now says to open only the matching example fixture. Signed-off-by: Lee Calcote <7570704+leecalcote@users.noreply.github.com>
Description
This PR fixes #1095.
getEntitydispatched relationship documents only on thev1beta2andv1alpha3schema version strings, so a definition authored against the canonical v1beta3 construct published by meshery/schemas fell through to the default case and failed to register - in Meshery Server seeding andmesheryctl model importalike. Components and models in the same switch already accept both their legacy and current version strings; relationships were left out of that compatibility pattern.Changes
relationships.meshery.io/v1beta3in the relationship case, decoding into the same shape-compatible registration struct (meshery/meshery'srelationship_version_bridge.goalready round-trips these shapes with shallow typed copies).RelationshipSchemaVersionV1Beta3beside the existing v1beta2 constant inschema/validator.go.Verification
go build ./...- cleango test ./...- full suite passesgolangci-lint run models/registration/... schema/...- 0 issuesCross-repo context
meshery/meshery#21479 documents v1beta3 as the relationship authoring target; until this fix reaches a meshkit release consumed by meshery/meshery, definitions that must register on current servers still need to declare
v1beta2(that PR's wording is being corrected to say exactly that).Summary by CodeRabbit
New Features
v1beta3.Bug Fixes
Tests
v1beta3and rejecting unsupported versions.