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(batch): Stabilize Batch #27059

Merged
merged 12 commits into from
Sep 9, 2023
Merged

feat(batch): Stabilize Batch #27059

merged 12 commits into from
Sep 9, 2023

Conversation

comcalvi
Copy link
Contributor

@comcalvi comcalvi commented Sep 8, 2023

graduates the alpha module.

All users of any ManagedComputeEnvironment who left updateToLatestImageVersion unspecified will see it default to undefined instead of true. If you use FargateComputeEnvironment, this upgrade may cause deployment errors; destroy the Fargate CE and recreate it to resolve this, if encountered.

Related: #27054.


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

@comcalvi comcalvi marked this pull request as ready for review September 8, 2023 01:36
@github-actions github-actions bot added bug This issue is a bug. p2 labels Sep 8, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team September 8, 2023 01:36
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 8, 2023
Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

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

I didn't look at the specifics of the src or tests since these are just ported over but I do have a few comments about files that ended up in the wrong spot. Additionally. I think we should be calling this a feat instead of a chore and not include the breaking change in the text. batch didn't have anything in it so it can't be breaking.

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't want this file moved.

Copy link
Contributor

Choose a reason for hiding this comment

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

This file shouldn't be within batch. It should be within the rosetta folder that then contains a folder for each module.

mrgrain
mrgrain previously requested changes Sep 8, 2023
Comment on lines +91 to +96
* Note: the CDK will never set this value by default, `false` will set by CFN.
* This is to avoid a deployment failure that occurs when this value is set.
*
* @see https://github.com/aws/aws-cdk/issues/27054
*
* @default false
Copy link
Contributor

Choose a reason for hiding this comment

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

I might be missing something here, but the linked issue makes it sound like setting this prop to true can break the deployment.

Can we fix the underlying issue before stabilization?

Copy link
Contributor Author

@comcalvi comcalvi Sep 8, 2023

Choose a reason for hiding this comment

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

The underlying issue is in CFN, and this is the fix. The problem is that whenever a ComputeEnvironment is created, the CFN handler first calls CreateCE, and then UpdateCE. The issue with this is that CreateCE does not set certain properties (in this case, this prop). UpdateCE is given these ignored properties, but UpdateCE sees that this property has changed (since it was not set by CreateCE); and, as the error indicates, these properties are not allowed to be changed.

CDK's default value is causing this issue by passing it in as true by default. The same issue would occur if it was false. This only occurs with Fargate, but the service team suggested the value not be set by default anywhere, so that is what this does.

The issue for this is really a needs-cfn, I'll update the issue.

@mrgrain mrgrain dismissed their stale review September 8, 2023 16:21

My concerns have been addressed

@comcalvi comcalvi changed the title chore(batch): Stabilize Batch feat(batch): Stabilize Batch Sep 8, 2023
@comcalvi
Copy link
Contributor Author

comcalvi commented Sep 8, 2023

@TheRealAmazonKendra true but it's breaking from the alpha module

it is also breaking the alpha module to move all of this code out

@mergify
Copy link
Contributor

mergify bot commented Sep 9, 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 5fc707a into main Sep 9, 2023
9 checks passed
@mergify mergify bot deleted the batchStable branch September 9, 2023 02:02
@mergify
Copy link
Contributor

mergify bot commented Sep 9, 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: 58858e5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

mikewrighton pushed a commit that referenced this pull request Sep 14, 2023
graduates the alpha module.

All users of any `ManagedComputeEnvironment` who left `updateToLatestImageVersion` unspecified will see it default to `undefined` instead of `true`. *If you use `FargateComputeEnvironment`, this upgrade may cause deployment errors; destroy the Fargate CE and recreate it to resolve this, if encountered.* 


Related: #27054.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants