Skip to content

Commit

Permalink
Disable AWS spot retry (#5215)
Browse files Browse the repository at this point in the history
This commit disables the AWS Batch spot auto-retries. 

The main reasons to disable this capability is:

* The same tasks can be re-tried multiple times incurring in significant spending increase with the user is a aware of that
* The AWS automatic retry re-execute a task in the same working directory because it's not directly managed by nextflow. This can introduce nasty side effects with partial/corrupted data left in a previous execution
* There's not log/visual feedback during the pipeline execution, because it's managed directly by AWS Batch.

User can still enable this capability by setting the following option:

```
aws.batch.maxSpotAttempts = n 
```

where n is a integer > 0


Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
Co-authored-by: Ben Sherman <[email protected]>
  • Loading branch information
pditommaso and bentsherman authored Aug 12, 2024
1 parent 2a71206 commit f28fcb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ The following settings are available:
`aws.batch.maxSpotAttempts`
: :::{versionadded} 22.04.0
:::
: Max number of execution attempts of a job interrupted by a EC2 spot reclaim event (default: `5`)
: :::{versionchanged} 24.08.0-edge
The default value was changed from `5` to `0`.
:::
: Max number of execution attempts of a job interrupted by a EC2 spot reclaim event (default: `0`)

`aws.batch.maxTransferAttempts`
: Max number of downloads attempts from S3 (default: `1`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import nextflow.util.Duration
@CompileStatic
class AwsBatchConfig implements CloudTransferOptions {

public static final int DEFAULT_MAX_SPOT_ATTEMPTS = 5
public static final int DEFAULT_MAX_SPOT_ATTEMPTS = 0

public static final int DEFAULT_AWS_MAX_ATTEMPTS = 5

Expand Down

0 comments on commit f28fcb2

Please sign in to comment.