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

(stepfunctions-task): BatchSubmitJob uses deprecated (and thereby ignored) container overrides API #18993

Closed
quaeler opened this issue Feb 16, 2022 · 2 comments · Fixed by #19298
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. effort/medium Medium work item – several days of effort p1

Comments

@quaeler
Copy link

quaeler commented Feb 16, 2022

What is the problem?

A BatchSubmitJob task allows configuration via an instance of BatchSubmitJobProps, which itself allows configuration overrides on the running container via an instance of BatchContainerOverrides.

Unfortunately, AWS Batch's submit job has deprecated the containerOverrides structure and now ignores it in favor of the defaults specified in the JobDefinition.

Neither the current V1 nor V2 CDK expose this new structure, nor does the CDK synthesis translate the old container overrides structure into the new structure.

Reproduction Steps

This can not plausibly be an SSCCE, but the batch submit job definition does look like, for example:

    const aTask = new tasks.BatchSubmitJob(this, 'Run a task', {
        jobDefinitionArn: jobArn,
        jobName: 'jobName',
        jobQueueArn: jobQueueArn,
        containerOverrides: {
            vcpus: 16,
            memory: 32678
        },
        resultPath: '$.Result'
    });

What did you expect to happen?

That, if the hypothetical job definition specifies a vCPU of 2, and a memory of 4,096, that the reproduction example would start a container with a vCPU of 16. and a memory of 32,768

What actually happened?

I will attach a screen shot of what the console shows in this situation, but in the continued hypothetical case, the container is launched with the job definition's default of a vCPU of 2 and memory of 4,096.

CDK CLI Version

1.116.0

Framework Version

No response

Node.js Version

14.18.0

OS

macOS 11.6.3

Language

Typescript

Language Version

3.8.3

Other information

No response

@quaeler quaeler added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 16, 2022
@quaeler
Copy link
Author

quaeler commented Feb 16, 2022

Console kvetch — in this case, the vCPU request of 16 matched the job default, but had it not, it would have the same warning text (substituting vCPU as the structure attribute name) as the memory.
Screen Shot 2022-02-15 at 9 00 38 AM

@peterwoodworth peterwoodworth added effort/medium Medium work item – several days of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 16, 2022
@mergify mergify bot closed this as completed in #19298 Mar 11, 2022
mergify bot pushed a commit that referenced this issue Mar 11, 2022
…19298)

fixes #18993 + update integ tests

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. effort/medium Medium work item – several days of effort p1
Projects
None yet
3 participants