Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(AzBatchService): Allow Azure Batch tasks to be submitted to different pools #5766

Conversation

adamrtalbot
Copy link
Collaborator

@adamrtalbot adamrtalbot commented Feb 7, 2025

context: https://nextflow.slack.com/archives/C02T98A23U7/p1738748591243169

Processes could not be submitted to different queues on Azure Batch because the logic looked for an existing job/pool before submitting and didn't check the queue details. This includes the pool ID so that it will now submit to different queues based on user configuration.

You can test it with the following main.nf:

process ECHO {
    queue { if (a == "a") "my_test_pool_1" else if (a == "b") "my_test_pool_2" else "my_test_pool_3" }
    container "ubuntu:2204"
    input:
        val a
    output:
        tuple val("sampleId"), val(a)

    script:
    """
    echo "a: ${a}"
    """
}


workflow {
    Channel.of("a", "b", "c")
    | ECHO
    | view
}

and nextflow.config (with credentials and details redacted):

azure {
    batch {
        copyToolInstallMode = 'node'
        deleteJobsOnCompletion = false
        deletePoolsOnCompletion = false
        autoPoolMode = false
        allowPoolCreation = true
        pools {
            my_test_pool_1 {
                vmType = 'Standard_e2d_v5'
                autoScale = true
                vmCount = 1
                maxVmCount = 4
            }
            my_test_pool_2 {
                vmType = 'Standard_e2d_v5'
                autoScale = true
                vmCount = 1
                maxVmCount = 4
            }
            my_test_pool_3 {
                vmType = 'Standard_e2d_v5'
                autoScale = true
                vmCount = 1
                maxVmCount = 4
            }
        }
   }
}

…erent pools by including the pool details in getOrCreateJob method

Processes could not be submitted to different queues on Azure Batch because the logic looked for an existing job/pool before submitting and didn't check the queue details. This includes the pool ID so that it will now submit to different queues based on user configuration.

Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
@adamrtalbot adamrtalbot changed the title feat(AzBatchService): Allow Azure Batch tasks to be submitted to different pools by including the pool details in getOrCreateJob method feat(AzBatchService): Allow Azure Batch tasks to be submitted to different pools Feb 7, 2025
Copy link

netlify bot commented Feb 7, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 66b0987
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/67a7a152ada50f0008da6e7e

Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
adamrtalbot and others added 4 commits February 8, 2025 09:44
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso pditommaso merged commit 8ff5caa into nextflow-io:master Feb 8, 2025
9 checks passed
pditommaso added a commit that referenced this pull request Feb 9, 2025
…i fast]

Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
adamrtalbot added a commit to adamrtalbot/nextflow that referenced this pull request Mar 27, 2025
…io#5766) [ci fast]

Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
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.

3 participants