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

fix(batch): JobDefinition's ContainerDefinition's Image is synthesized with [Object object] #25466

Merged
merged 4 commits into from May 8, 2023

Conversation

comcalvi
Copy link
Contributor

@comcalvi comcalvi commented May 5, 2023

We were using Tokenization.resolve(), which uses a generic token resolver that does ${token1}${token2} instead of creating an Fn::Split object. The only reason that token existed was to mutate the L1 object after synthesis so subclasses could fill in the executionRole. The executionRole was meant to be optional for EC2 jobs and required for Fargate jobs. Setting the loggingConfig being defined would force it to be defined it for EC2 Jobs. However, the loggingConfig was always defined, because it was set to a Lazy (which could result in undefined, but that doesn't matter: it was defined during synthesis). So the executionRole was always being set:

    this.executionRole = props.executionRole ?? (this.logDriverConfig ? createExecutionRole(this, 'ExecutionRole') : undefined);

This PR makes it clear that the executionRole is created by default.

Closes #25250


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@comcalvi comcalvi requested a review from rix0rrr May 5, 2023 21:58
@gitpod-io
Copy link

gitpod-io bot commented May 5, 2023

@aws-cdk-automation aws-cdk-automation requested a review from a team May 5, 2023 21:58
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels May 5, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 5, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation dismissed their stale review May 5, 2023 22:14

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 5, 2023
@comcalvi comcalvi removed the request for review from rix0rrr May 5, 2023 22:32
@@ -1523,6 +1523,27 @@ information that can be obtained from the stack trace.

* Do not use FnSub

### Lazys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mergify
Copy link
Contributor

mergify bot commented May 8, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: a700805
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented May 8, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit b3d0d57 into aws:main May 8, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_batch_alpha: [object Object] in Cfn template synthetized image name with ECR image
4 participants