Skip to content

Commit

Permalink
In Google Batch, add missed warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
siddharthab committed Sep 3, 2024
1 parent bf0cd32 commit d848010
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/google.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit d848010

Please sign in to comment.