diff --git a/plugins/nf-google/src/main/nextflow/cloud/google/batch/GoogleBatchTaskHandler.groovy b/plugins/nf-google/src/main/nextflow/cloud/google/batch/GoogleBatchTaskHandler.groovy index 827eb1e483..c7cbd17dc6 100644 --- a/plugins/nf-google/src/main/nextflow/cloud/google/batch/GoogleBatchTaskHandler.groovy +++ b/plugins/nf-google/src/main/nextflow/cloud/google/batch/GoogleBatchTaskHandler.groovy @@ -347,6 +347,7 @@ class GoogleBatchTaskHandler extends TaskHandler implements FusionAwareTask { LogsPolicy.newBuilder() .setDestination(LogsPolicy.Destination.CLOUD_LOGGING) ) + .putAllLabels(task.config.getResourceLabels()) .build() } diff --git a/plugins/nf-google/src/test/nextflow/cloud/google/batch/GoogleBatchTaskHandlerTest.groovy b/plugins/nf-google/src/test/nextflow/cloud/google/batch/GoogleBatchTaskHandlerTest.groovy index 48b523ed75..ec648112cb 100644 --- a/plugins/nf-google/src/test/nextflow/cloud/google/batch/GoogleBatchTaskHandlerTest.groovy +++ b/plugins/nf-google/src/test/nextflow/cloud/google/batch/GoogleBatchTaskHandlerTest.groovy @@ -217,6 +217,9 @@ class GoogleBatchTaskHandlerTest extends Specification { networkInterface.getNoExternalIpAddress() == true and: req.getLogsPolicy().getDestination().toString() == 'CLOUD_LOGGING' + and: + req.getLabelsMap() == [foo: 'bar'] + when: req = handler.newSubmitRequest(task, launcher)