From 4fbf74e1b1c1c3c4cb9dddeb7c5c7078e7cf2055 Mon Sep 17 00:00:00 2001 From: Simon AURA--SCUSSEL Date: Fri, 13 Nov 2026 15:21:44 +0100 Subject: [PATCH] feat: add the encryption attribute to the CoreArtifact protocols Infrahub adds a read-only `encryption` attribute to `CoreArtifact`: plaintext, encrypted or unreadable. The generated protocols did not have it, so typed code could not read it, and the Infrahub check that the generated files are up to date fails. Regenerate `protocols.py` from the Infrahub core models, which adds `encryption: String` to `CoreArtifact` and `CoreArtifactSync`, and add a changelog entry. Signed-off-by: Simon AURA--SCUSSEL --- changelog/+core-artifact-encryption-protocol.added.md | 1 + infrahub_sdk/protocols.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog/+core-artifact-encryption-protocol.added.md diff --git a/changelog/+core-artifact-encryption-protocol.added.md b/changelog/+core-artifact-encryption-protocol.added.md new file mode 100644 index 000000000..93e02a62d --- /dev/null +++ b/changelog/+core-artifact-encryption-protocol.added.md @@ -0,0 +1 @@ +Added the read-only `encryption` attribute to the `CoreArtifact` and `CoreArtifactSync` protocols, so typed code can read whether the stored file of an artifact is plaintext, encrypted or unreadable. diff --git a/infrahub_sdk/protocols.py b/infrahub_sdk/protocols.py index 65f33a534..1e239d03f 100644 --- a/infrahub_sdk/protocols.py +++ b/infrahub_sdk/protocols.py @@ -370,6 +370,7 @@ class CoreAccountRole(CoreNode): class CoreArtifact(CoreTaskTarget): checksum: StringOptional content_type: String + encryption: String name: String parameters: JSONAttributeOptional status: String @@ -1513,6 +1514,7 @@ class CoreAccountRoleSync(CoreNodeSync): class CoreArtifactSync(CoreTaskTargetSync): checksum: StringOptional content_type: String + encryption: String name: String parameters: JSONAttributeOptional status: String