Conversation
IpamCVLAN builds its HFID from svlan__name__value, and strict schema mode requires that attribute to be unique on the peer. IpamSVLAN only got a name__value constraint implicitly, from the HFID it inherits off IpamGenericVLAN, and releases before Infrahub 1.9 don't propagate an inherited HFID into uniqueness constraints, so they rejected the extension. Declaring the constraint makes it load everywhere; on 1.9+ the effective schema is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Deploying schema-library with
|
| Latest commit: |
0420e96
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://924235f3.schema-library.pages.dev |
| Branch Preview URL: | https://atg-qinq-svlan-name-unique.schema-library.pages.dev |
dgarros
approved these changes
Sep 29, 2026
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.
Problem
Loading the QinQ extension fails on older Infrahub servers:
Reported via the marketplace:
infrahubctl marketplace get infrahub/traditional-infrastructure-sot --collectionfollowed byinfrahubctl schema load.Cause
IpamCVLAN.human_friendly_idis[svlan__name__value, vlan_id__value]. Withschema_strict_modeon (the default), Infrahub requiresnameto be unique onIpamSVLAN.IpamSVLANdoesn't declare that: its only explicit constraint is[vlan_id__value, vlan_group], and it getsname__valueas its HFID fromIpamGenericVLAN.IpamSVLAN's uniqueness constraints and validation passes.Fix
Declare
[name__value]explicitly onIpamSVLAN. On 1.9+ this is the constraint Infrahub already derives, so the effective schema doesn't change. It just stops depending on the server version. The docs are regenerated and afixednews fragment is added.Testing
yamllint -s .passes.SchemaBranch.process_pre_validation/validate_human_friendly_idatinfrahub-v1.8.0vsinfrahub-v1.9.0. The CIload-all-schemasjob covers current Infrahub.🤖 Generated with Claude Code