From 2757d2ec9dfe59522a3b3cd7cdc7978fba433139 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 27 Aug 2024 10:56:22 +0200 Subject: [PATCH 1/2] Use display label instead of name --- .../message_bus/operations/requests/artifact_definition.py | 4 ++-- .../message_bus/operations/requests/generator_definition.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/infrahub/message_bus/operations/requests/artifact_definition.py b/backend/infrahub/message_bus/operations/requests/artifact_definition.py index 4c19fa9ad5..2020d6f9d1 100644 --- a/backend/infrahub/message_bus/operations/requests/artifact_definition.py +++ b/backend/infrahub/message_bus/operations/requests/artifact_definition.py @@ -107,7 +107,7 @@ async def check(message: messages.RequestArtifactDefinitionCheck, service: Infra query=message.artifact_definition.query_name, variables=member.extract(params=artifact_definition.parameters.value), target_id=member.id, - target_name=member.name.value, + target_name=member.display_label, timeout=message.artifact_definition.timeout, validator_id=validator.id, meta=Meta(validator_execution_id=validator_execution_id, check_execution_id=check_execution_id), @@ -203,7 +203,7 @@ async def generate(message: messages.RequestArtifactDefinitionGenerate, service: query=query.name.value, variables=member.extract(params=artifact_definition.parameters.value), target_id=member.id, - target_name=member.name.value, + target_name=member.display_label, timeout=transform.timeout.value, ) ) diff --git a/backend/infrahub/message_bus/operations/requests/generator_definition.py b/backend/infrahub/message_bus/operations/requests/generator_definition.py index 6bc7a41868..92c03e839e 100644 --- a/backend/infrahub/message_bus/operations/requests/generator_definition.py +++ b/backend/infrahub/message_bus/operations/requests/generator_definition.py @@ -101,7 +101,7 @@ async def check(message: messages.RequestGeneratorDefinitionCheck, service: Infr query=message.generator_definition.query_name, variables=member.extract(params=message.generator_definition.parameters), target_id=member.id, - target_name=member.name.value, + target_name=member.display_label, validator_id=validator.id, meta=Meta(validator_execution_id=validator_execution_id, check_execution_id=check_execution_id), ) @@ -177,7 +177,7 @@ async def run(message: messages.RequestGeneratorDefinitionRun, service: Infrahub query=message.generator_definition.query_name, variables=member.extract(params=message.generator_definition.parameters), target_id=member.id, - target_name=member.name.value, + target_name=member.display_label, ) ) From 6054f039913eab6093e9c67905e3c20e7618c9d1 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Tue, 27 Aug 2024 10:58:01 +0200 Subject: [PATCH 2/2] Add changelog shard --- changelog/4062.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/4062.fixed.md diff --git a/changelog/4062.fixed.md b/changelog/4062.fixed.md new file mode 100644 index 0000000000..dfbbe0e503 --- /dev/null +++ b/changelog/4062.fixed.md @@ -0,0 +1 @@ +Allow users to run artifacts and generators on nodes without name attribute \ No newline at end of file