Skip to content

Add custom job names for AWS Batch - #7538

Open
CHU4694 wants to merge 1 commit into
nextflow-io:masterfrom
CHU4694:feat/custom-aws-batch-jobname
Open

Add custom job names for AWS Batch#7538
CHU4694 wants to merge 1 commit into
nextflow-io:masterfrom
CHU4694:feat/custom-aws-batch-jobname

Conversation

@CHU4694

@CHU4694 CHU4694 commented Aug 25, 2026

Copy link
Copy Markdown

Summary

AWS Batch currently generates job names from the task name and does not honor the executor.jobName configuration option. This makes it difficult to identify jobs from different users or workflow runs in a shared AWS Batch queue.

This PR adds support for the executor.jobName option in AWS Batch, following the existing behavior of grid executors and Google Batch.

process {
    executor = 'awsbatch'
}

executor {
    jobName = { "custom-${task.name}" }
}

Changes

  • Resolve the executor.jobName closure through executor.config.
  • Evaluate the closure with task bound to the task configuration, consistent with grid executors and Google Batch.
  • Normalize custom names according to AWS Batch naming constraints and limit them to 128 characters.
  • Fall back to the existing automatically generated job name when the closure:
    • is not configured;
    • returns null or an empty value;
    • throws an exception;
    • produces a normalized name that does not start with an alphanumeric character.
  • Update the executor.jobName configuration description to include AWS Batch.

Testing

  • Added coverage for resolving and normalizing custom AWS Batch job names.
  • Added fallback coverage for missing, null, empty, invalid, and failing job name closures.
  • Verified that custom job names beginning with a number are accepted.
  • AwsBatchTaskHandlerTest: 114 tests, 0 failures.
  • Full nf-amazon test suite: 474 tests, 0 failures, 58 skipped.
  • Validated custom job name submission with an AWS Batch workflow.

Closes #1232

Signed-off-by: Hyeonuk Choi <176981477+CHU4694@users.noreply.github.com>
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs canceled.

Name Link
🔨 Latest commit 4eec113
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs/deploys/6a8d52c714a4570008a44ed2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom AWS Batch job names

2 participants