From 1542bab9cc050b2c191addf74d0b94e0249ffd9e Mon Sep 17 00:00:00 2001 From: Vincent Latombe Date: Wed, 21 Aug 2024 16:57:16 +0200 Subject: [PATCH 1/2] Expose ExecutorStepExecution#getEnclosingLabel --- .../plugins/workflow/support/steps/ExecutorStepExecution.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java index 658020cf..6d332d7d 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java @@ -807,7 +807,7 @@ public String getAffinityKey() { /** hash code of list of heads */ private transient int lastCheckedHashCode; private transient String lastEnclosingLabel; - @Restricted(NoExternalUse.class) // for Jelly + public @CheckForNull String getEnclosingLabel() { if (!context.isReady()) { return null; From 04ab39e9e9db7d6206eb5e64ad5a5123f9cb35ae Mon Sep 17 00:00:00 2001 From: Vincent Latombe Date: Wed, 21 Aug 2024 17:20:03 +0200 Subject: [PATCH 2/2] Expose with Beta --- .../plugins/workflow/support/steps/ExecutorStepExecution.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java index 6d332d7d..e4172ed2 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java @@ -94,6 +94,7 @@ import org.jenkinsci.plugins.workflow.support.actions.WorkspaceActionImpl; import org.jenkinsci.plugins.workflow.support.concurrent.Timeout; import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.Beta; import org.kohsuke.accmod.restrictions.DoNotUse; import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.stapler.export.Exported; @@ -808,6 +809,7 @@ public String getAffinityKey() { private transient int lastCheckedHashCode; private transient String lastEnclosingLabel; + @Restricted(Beta.class) public @CheckForNull String getEnclosingLabel() { if (!context.isReady()) { return null;