Skip to content

Commit 0c11127

Browse files
committed
Ignore secrets in stub run
Signed-off-by: Ben Sherman <[email protected]>
1 parent 21a6470 commit 0c11127

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

modules/nextflow/src/main/groovy/nextflow/executor/BashWrapperBuilder.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class BashWrapperBuilder {
117117
private BashTemplateEngine engine = new BashTemplateEngine()
118118

119119
BashWrapperBuilder( TaskRun task ) {
120-
this(new TaskBean(task))
120+
this(task.toTaskBean())
121121
}
122122

123123
BashWrapperBuilder( TaskBean bean, ScriptFileCopyStrategy strategy = null ) {

modules/nextflow/src/main/groovy/nextflow/processor/TaskBean.groovy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ class TaskBean implements Serializable, Cloneable {
123123
}
124124

125125
TaskBean(TaskRun task) {
126+
this(task, false)
127+
}
128+
129+
TaskBean(TaskRun task, boolean stubRun) {
126130

127131
this.name = task.name
128132

@@ -154,9 +158,10 @@ class TaskBean implements Serializable, Cloneable {
154158
this.containerEnabled = task.isContainerEnabled()
155159
this.containerOptions = task.config.getContainerOptions()
156160
this.containerPlatform = task.getContainerPlatform()
161+
157162
// secret management
158163
this.secretNative = task.isSecretNative()
159-
this.secretNames = task.config.getSecret()
164+
this.secretNames = stubRun ? task.config.getSecret() : null
160165

161166
// stats
162167
this.outputEnvNames = task.getOutputEnvNames()

modules/nextflow/src/main/groovy/nextflow/processor/TaskRun.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ class TaskRun implements Cloneable {
984984
}
985985

986986
TaskBean toTaskBean() {
987-
return new TaskBean(this)
987+
return new TaskBean(this, processor.session.stubRun)
988988
}
989989

990990
CondaConfig getCondaConfig() {

0 commit comments

Comments
 (0)