nextflow-io / nextflow-io/nextflow

Conditionally populate resourceLabels to tag field in AWS Batch job definition

Open
#5,413 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

executor/aws-batch
Dominant language
Groovy
Stars
3.5k
Forks
811
Avg merge
2d 11h
Merged PRs (30d)
61

Description

New feature

Proposed change, if resourceLabels are present for a given process. They should populate the AwsBatchTaskHandler's tag's field when Nextflow registers a job definition on AWS Batch.

Usage scenario

Multiple users have asked for this feature to track resource utilization and this can be used by AWS Solutions Architects to manage Nextflow behavior in non-NF Tower systems. This also allows AWS Solutions Architects to track costs, compute utilization, and optimize deployments across AWS Batch's resources like Fargate and EC2.

Suggest implementation

Add a conditional to the nf-amazon plugin's groovy source code where if resourceLabels are present for a given process that is trying to register an AWS Batch template, the resourceLabels contents populate the tags via req.addTagsEntry().

https://github.com/nextflow-io/nextflow/blob/711864fd4fcdbf6839f0370fb609d28a003b6942/plugins/nf-amazon/src/main/nextflow/cloud/aws/batch/AwsBatchTaskHandler.groovy#L657

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in plugins/nf-amazon/src/main/nextflow/cloud/aws/batch/AwsBatchTaskHandler.groovy at the registration code around line 657, and inspect how req.addTagsEntry() is used. The change is complete when present resourceLabels for a process populate the AWS Batch job definition tags, while processes without them remain unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, groovy
Domain
cloud
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.