From d848010bb280edfbaad096b2e1b75bc36606fc6b Mon Sep 17 00:00:00 2001 From: Siddhartha Bagaria <1929612+siddharthab@users.noreply.github.com> Date: Tue, 3 Sep 2024 16:31:29 +0000 Subject: [PATCH] In Google Batch, add missed warning When both boot disk image and instance template are specified, the instance template gets priority, as with many other options covered by instance templates. Warn the user in this case. This was missed in #5268. Signed-off-by: Siddhartha Bagaria <1929612+siddharthab@users.noreply.github.com> --- docs/google.md | 2 +- .../nextflow/cloud/google/batch/GoogleBatchTaskHandler.groovy | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/google.md b/docs/google.md index 232fcc29fd..30bd8d4f84 100644 --- a/docs/google.md +++ b/docs/google.md @@ -156,7 +156,7 @@ process myTask { :::{note} Using an instance template will overwrite the `accelerator` and `disk` directives, as well as the following Google Batch -config options: `cpuPlatform`, `preemptible`, and `spot`. +config options: `bootDiskImage`, `cpuPlatform`, `preemptible`, and `spot`. ::: To use an instance template with GPUs, you must also set the `google.batch.installGpuDrivers` config option to `true`. 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 b7a33cafed..389f2247b6 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 @@ -303,6 +303,9 @@ class GoogleBatchTaskHandler extends TaskHandler implements FusionAwareTask { if( task.config.getDisk() ) log.warn1 'Process directive `disk` ignored because an instance template was specified' + if( executor.config.getBootDiskImage() ) + log.warn1 'Config option `google.batch.bootDiskImage` ignored because an instance template was specified' + if( executor.config.cpuPlatform ) log.warn1 'Config option `google.batch.cpuPlatform` ignored because an instance template was specified'