-
Notifications
You must be signed in to change notification settings - Fork 19
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
IFC-15 Support for mandatory/optional parent relationship #5561
Merged
Conversation
This file contains 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
github-actions
bot
added
the
group/backend
Issue related to the backend (API Server, Git Agent)
label
Jan 24, 2025
CodSpeed Performance ReportMerging #5561 will not alter performanceComparing Summary
|
gmazoyer
force-pushed
the
gma-20250122-3682
branch
4 times, most recently
from
January 27, 2025 07:15
7c230f5
to
fda752c
Compare
gmazoyer
force-pushed
the
gma-20250122-3682
branch
from
January 27, 2025 09:36
fda752c
to
5a700bf
Compare
ogenstad
reviewed
Jan 27, 2025
ogenstad
approved these changes
Jan 27, 2025
ajtmccarty
approved these changes
Jan 27, 2025
@@ -633,7 +633,7 @@ def validate_schema_path( | |||
and not ( | |||
schema_attribute_path.relationship_schema.name == "ip_namespace" | |||
and isinstance(node_schema, NodeSchema) | |||
and (node_schema.is_ip_address() or node_schema.is_ip_prefix) | |||
and (node_schema.is_ip_address() or node_schema.is_ip_prefix()) |
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.
😬
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.
it's been here for quite a while 😬
The `parent` relationship becomes mandatory if the node depends on another one which is not itself or a generic of itself. This allows, for instance, to not require a continent to have a parent while enforcing a country to have a parent continent. The parent won't be required if a node can depends on one of its own. For instance, an IP prefix can have a parent prefix, which is still optional as an prefix can live on its own.
gmazoyer
force-pushed
the
gma-20250122-3682
branch
from
January 27, 2025 17:32
cec33f3
to
3105d80
Compare
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.
Fixes #3682
This PR makes parent relationship mandatory in some cases.
The
parent
relationship becomes mandatory if the node depends on another one which is not itself or a generic of itself.This allows, for instance, to not require a continent to have a parent while enforcing a
country to have a parent continent.
The parent won't be required if a node can depends on one of its own. For instance, an IP prefix can have a parent prefix, which is still optional as an prefix can live on its own.