From 7e227afb9761827688076395f3703332c72d370e Mon Sep 17 00:00:00 2001 From: Dhanus Date: Wed, 24 Jun 2026 00:12:04 +0530 Subject: [PATCH 1/2] fix: Remove is_inherited from attributes --- changelog/995.fixed.md | 1 + infrahub_sdk/node/attribute.py | 3 +-- infrahub_sdk/protocols_base.py | 1 - .../fixtures/unit/test_graphql_plugin/schema.graphql | 11 ----------- .../unit/test_infrahubctl/graphql/test_schema.graphql | 2 -- 5 files changed, 2 insertions(+), 16 deletions(-) create mode 100644 changelog/995.fixed.md diff --git a/changelog/995.fixed.md b/changelog/995.fixed.md new file mode 100644 index 00000000..78b914ae --- /dev/null +++ b/changelog/995.fixed.md @@ -0,0 +1 @@ +Removed `is_inherited` from attributes. The field is no longer part of Infrahub's GraphQL schema, so it has been dropped from attribute objects and the `Attribute` protocol. diff --git a/infrahub_sdk/node/attribute.py b/infrahub_sdk/node/attribute.py index c72802d7..f141e5bc 100644 --- a/infrahub_sdk/node/attribute.py +++ b/infrahub_sdk/node/attribute.py @@ -67,7 +67,7 @@ def __init__(self, name: str, schema: AttributeSchemaAPI, data: Any | dict) -> N self._properties_object = PROPERTIES_OBJECT self._properties = self._properties_flag + self._properties_object - self._read_only = ["updated_at", "is_inherited"] + self._read_only = ["updated_at"] self.id: str | None = data.get("id") @@ -84,7 +84,6 @@ def __init__(self, name: str, schema: AttributeSchemaAPI, data: Any | dict) -> N mapper = value_mapper.get(schema.kind, lambda value: value) self._value = mapper(data.get("value")) - self.is_inherited: bool | None = data.get("is_inherited") self.updated_at: str | None = data.get("updated_at") self.is_protected: bool | None = data.get("is_protected") diff --git a/infrahub_sdk/protocols_base.py b/infrahub_sdk/protocols_base.py index cacd8025..f0dce9db 100644 --- a/infrahub_sdk/protocols_base.py +++ b/infrahub_sdk/protocols_base.py @@ -55,7 +55,6 @@ class Attribute(Protocol): id: str | None is_default: bool | None is_from_profile: bool | None - is_inherited: bool | None updated_at: str | None is_protected: bool | None diff --git a/tests/fixtures/unit/test_graphql_plugin/schema.graphql b/tests/fixtures/unit/test_graphql_plugin/schema.graphql index 263eae2a..5b0bc645 100644 --- a/tests/fixtures/unit/test_graphql_plugin/schema.graphql +++ b/tests/fixtures/unit/test_graphql_plugin/schema.graphql @@ -7,7 +7,6 @@ directive @expand( """Attribute of type Text""" type TextAttribute implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -21,7 +20,6 @@ type TextAttribute implements AttributeInterface { interface AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -51,7 +49,6 @@ enum BranchRelativePermissionDecision { """Attribute of type Dropdown""" type Dropdown implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -69,7 +66,6 @@ type Dropdown implements AttributeInterface { """Attribute of type MacAddress""" type MacAddress implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -102,7 +98,6 @@ type MacAddress implements AttributeInterface { """Attribute of type Number""" type NumberAttribute implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -124,7 +119,6 @@ scalar BigInt """Attribute of type IPHost""" type IPHost implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -146,7 +140,6 @@ type IPHost implements AttributeInterface { """Attribute of type IPNetwork""" type IPNetwork implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -169,7 +162,6 @@ type IPNetwork implements AttributeInterface { """Attribute of type Checkbox""" type CheckboxAttribute implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -184,7 +176,6 @@ type CheckboxAttribute implements AttributeInterface { """Attribute of type List""" type ListAttribute implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -206,7 +197,6 @@ scalar GenericScalar """Attribute of type JSON""" type JSONAttribute implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -221,7 +211,6 @@ type JSONAttribute implements AttributeInterface { """Attribute of type GenericScalar""" type AnyAttribute implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime diff --git a/tests/fixtures/unit/test_infrahubctl/graphql/test_schema.graphql b/tests/fixtures/unit/test_infrahubctl/graphql/test_schema.graphql index e2a631f0..28fee7fa 100644 --- a/tests/fixtures/unit/test_infrahubctl/graphql/test_schema.graphql +++ b/tests/fixtures/unit/test_infrahubctl/graphql/test_schema.graphql @@ -1,7 +1,6 @@ """Attribute of type Text""" type TextAttribute implements AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime @@ -11,7 +10,6 @@ type TextAttribute implements AttributeInterface { interface AttributeInterface { is_default: Boolean - is_inherited: Boolean is_protected: Boolean is_visible: Boolean updated_at: DateTime From 9d63b313703c152939c26f193265f5b97afdf8ae Mon Sep 17 00:00:00 2001 From: Dhanus Date: Wed, 24 Jun 2026 00:27:32 +0530 Subject: [PATCH 2/2] chore: Change changelog to removed --- changelog/{995.fixed.md => 995.removed.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog/{995.fixed.md => 995.removed.md} (100%) diff --git a/changelog/995.fixed.md b/changelog/995.removed.md similarity index 100% rename from changelog/995.fixed.md rename to changelog/995.removed.md