Skip to content

feat: IHS-190 (part of IFC-2162) Add namespace restriction parameter to generic schemas#806

Closed
polmichel wants to merge 8 commits intopmi-20260204-namespace-restriction-ifc-2162from
develop
Closed

feat: IHS-190 (part of IFC-2162) Add namespace restriction parameter to generic schemas#806
polmichel wants to merge 8 commits intopmi-20260204-namespace-restriction-ifc-2162from
develop

Conversation

@polmichel
Copy link

@polmichel polmichel commented Feb 9, 2026

To understand the global feature, see this PR: opsmill/infrahub#8319

This PR is about updating infrahub_sdk.schema.main.GenericSchemaAPI with the new generic schema parameter "restricted_namespaces".

Goal

See opsmill/infrahub#8319

Non-goals

Added another missing attribute to infrahub_sdk.schema.main.GenericSchemaAPI: hierarchical. This attribute was already into the internal Infrahub generic schema model.

What changed

Generic schemas into SDK API.

How-to review

This PR is quite small: commit by commit, in the chronological order.

How to test

Automated back-end tests:

uv run pytest tests/unit/ctl/test_schema_app.py tests/unit/sdk/test_schema.py

  • new test loading a generic schema through infrahubctl command, Infrahub API is mocked
  • new test ensuring that a schema not following the namespace restriction rule is rejected with the correct error message when loaded from python-sdk utilities. Infrahub API is mocked.

Application testing scenarios:

  • Load a valid generic schema from SDK API using the new attribute "restricted_namespaces".
  • Load an invalid schema from SDK API not following the namespace restriction rule.

Impact & rollout

Deployment notes: safe to deploy

Closes IHS-190

@polmichel polmichel self-assigned this Feb 9, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@polmichel polmichel closed this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants