Skip to content

Commit 9951fcd

Browse files
committed
Prefix nextflow labels with nextflow.io prefix [ci fast]
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
1 parent 3711267 commit 9951fcd

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

modules/nextflow/src/main/groovy/nextflow/k8s/K8sTaskHandler.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ class K8sTaskHandler extends TaskHandler implements FusionAwareTask {
275275
final resLabels = task.config.getResourceLabels()
276276
if( resLabels )
277277
resLabels.putAll(resLabels)
278-
result.app = 'nextflow'
279-
result.runName = getRunName()
280-
result.taskName = task.getName()
281-
result.processName = task.getProcessor().getName()
282-
result.sessionId = "uuid-${executor.getSession().uniqueId}" as String
278+
result.'nextflow.io/app' = 'nextflow'
279+
result.'nextflow.io/runName' = getRunName()
280+
result.'nextflow.io/taskName' = task.getName()
281+
result.'nextflow.io/processName' = task.getProcessor().getName()
282+
result.'nextflow.io/sessionId' = "uuid-${executor.getSession().uniqueId}" as String
283283
return result
284284
}
285285

modules/nextflow/src/test/groovy/nextflow/k8s/K8sTaskHandlerTest.groovy

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -806,11 +806,13 @@ class K8sTaskHandlerTest extends Specification {
806806

807807
labels.app == 'nextflow'
808808
labels.foo == 'bar'
809-
labels.x == 'hello_world'
810-
labels.processName == 'hello-proc'
811-
labels.taskName == 'hello-world-1'
812-
labels.sessionId instanceof String
813-
labels.sessionId == "uuid-${uuid.toString()}".toString()
809+
labels.x == 'hello_world'
810+
and:
811+
labels.'nextflow.io/app' == 'nextflow'
812+
labels.'nextflow.io/processName' == 'hello-proc'
813+
labels.'nextflow.io/taskName' == 'hello-world-1'
814+
labels.'nextflow.io/sessionId' instanceof String
815+
labels.'nextflow.io/sessionId' == "uuid-${uuid.toString()}".toString()
814816
}
815817

816818
def 'should delete pod if complete' () {

0 commit comments

Comments
 (0)