From 4fe1aaeb179d65fffdd4614edbabef20beaff84a Mon Sep 17 00:00:00 2001 From: mallain Date: Thu, 14 Dec 2023 13:18:14 +0100 Subject: [PATCH] bugfix: wrong unit used in SetVariable error message on payloadSize > maxThreshold --- .../com/netflix/conductor/core/execution/tasks/SetVariable.java | 2 +- .../conductor/test/integration/SetVariableTaskSpec.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/netflix/conductor/core/execution/tasks/SetVariable.java b/core/src/main/java/com/netflix/conductor/core/execution/tasks/SetVariable.java index 8353e6a2e..2af835cdd 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/tasks/SetVariable.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/tasks/SetVariable.java @@ -66,7 +66,7 @@ private boolean validateVariablesSize( if (payloadSize > maxThreshold * 1024) { String errorMsg = String.format( - "The variables payload size: %d of workflow: %s is greater than the permissible limit: %d bytes", + "The variables payload size: %d of workflow: %s is greater than the permissible limit: %d kilobytes", payloadSize, workflowId, maxThreshold); LOGGER.error(errorMsg); task.setReasonForIncompletion(errorMsg); diff --git a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/SetVariableTaskSpec.groovy b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/SetVariableTaskSpec.groovy index 5eace9207..714300f48 100644 --- a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/SetVariableTaskSpec.groovy +++ b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/SetVariableTaskSpec.groovy @@ -62,7 +62,7 @@ class SetVariableTaskSpec extends AbstractSpecification { def EXTRA_HASHMAP_SIZE = 17 def expectedErrorMessage = String.format( - "The variables payload size: %d of workflow: %s is greater than the permissible limit: %d bytes", + "The variables payload size: %d of workflow: %s is greater than the permissible limit: %d kilobytes", EXTRA_HASHMAP_SIZE + maxThreshold * 1024 + 1, workflowInstanceId, maxThreshold) then: "verify that the task is completed and variables were set"