Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/995.removed.md
Original file line number Diff line number Diff line change
@@ -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.
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
3 changes: 1 addition & 2 deletions infrahub_sdk/node/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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")
Expand Down
1 change: 0 additions & 1 deletion infrahub_sdk/protocols_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 0 additions & 11 deletions tests/fixtures/unit/test_graphql_plugin/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down