From a53be2ad6b95def56bd77dd4792b1ea32299c2b6 Mon Sep 17 00:00:00 2001 From: Edgars Batna Date: Thu, 19 Feb 2026 14:33:58 +0100 Subject: [PATCH] Remove MAX_LABEL_LENGTH to avoid cutting the string in the middle of a unicode char, which corrupts the whole build. If necessary, this should be done at the view level instead. --- .../workflow/steps/durable_task/DurableTaskStep.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java b/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java index fea45e67c..0675ce377 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java @@ -102,8 +102,6 @@ public abstract class DurableTaskStep extends Step implements EnvVarsFilterableB private static final Logger LOGGER = Logger.getLogger(DurableTaskStep.class.getName()); - private static final int MAX_LABEL_LENGTH = 100; - private boolean returnStdout; private String encoding; private boolean returnStatus; @@ -145,7 +143,7 @@ public String getLabel() { @Override public StepExecution start(StepContext context) throws Exception { if (this.label != null) { - context.get(FlowNode.class).addAction(new LabelAction(StringUtils.left(label, MAX_LABEL_LENGTH))); + context.get(FlowNode.class).addAction(new LabelAction(label)); } return new Execution(context, this); } @@ -173,9 +171,6 @@ public FormValidation doCheckReturnStatus(@QueryParameter boolean returnStdout, } public FormValidation doCheckLabel(@QueryParameter String label) { - if (label != null && label.length() > MAX_LABEL_LENGTH) { - return FormValidation.error("Label size exceeds maximum of " + MAX_LABEL_LENGTH + " characters."); - } return FormValidation.ok(); }