-
Couldn't load subscription status.
- Fork 4.3k
fix: stop passing the deprecated property to Cfn construct #35080
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: stop passing the deprecated property to Cfn construct #35080
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes lazy loading for the deprecated inferenceAccelerators property in ECS task definitions to eliminate warnings. The change simplifies the code by directly evaluating the inference accelerators condition instead of wrapping it in a lazy loader.
- Replaces lazy-loaded
inferenceAcceleratorswith direct evaluation - Maintains the same conditional logic for Fargate compatibility
- Addresses deprecation warnings from the lazy loading mechanism
There was a problem hiding this 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 fails with the following errors:
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
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.
✅ A exemption request has been requested. Please wait for a maintainer's review.
|
Exemption Request - as previously, I don't think this needs tests. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
594ce5e to
bf6ef59
Compare
|
@pahud any chance you can help finding a reviewer? |
bf6ef59 to
baaeea7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a unit test (at packages/aws-cdk-lib/aws-ecs/test/task-definition.test.ts) is needed here just to check that the inferenceAccelerator is not added by default and that it is only added iff an inferenceAccelerator is passed.
This is already covered by unit tests. |
Is there a unit test to test that inferenceAccelerator is not passed if not provided? (by using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per my comment above. A unit test to test that inferenceAccelerator is not passed is needed here. You can use Match.absent to achieve this.
c96a66f to
20b682f
Compare
20b682f to
edc8633
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integ test snapshots would need to be updated:
@aws-cdk-testing/framework-integ: CHANGED aws-dynamodb/test/integ.global-replicas-provisioned 2.532s
@aws-cdk-testing/framework-integ: Resources
@aws-cdk-testing/framework-integ: [~] AWS::CloudFormation::Stack awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D
@aws-cdk-testing/framework-integ: └─ [~] TemplateURL
@aws-cdk-testing/framework-integ: └─ [~] .Fn::Join:
@aws-cdk-testing/framework-integ: └─ @@ -13,6 +13,6 @@
@aws-cdk-testing/framework-integ: [ ] {
@aws-cdk-testing/framework-integ: [ ] "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
@aws-cdk-testing/framework-integ: [ ] },
@aws-cdk-testing/framework-integ: [-] "/be82eb3f30fbf19ad6227c31590fdcc98fdc3f1968a085e41f52ff22aaa2fff6.json"
@aws-cdk-testing/framework-integ: [+] "/d80a42298fecb9cef8ab0548bbddde09f369cc7d09c1c6fabbae147532f77556.json"
@aws-cdk-testing/framework-integ: [ ] ]
@aws-cdk-testing/framework-integ: [ ] ]
@aws-cdk-testing/framework-integ:
@aws-cdk-testing/framework-integ:
@aws-cdk-testing/framework-integ: CHANGED aws-dynamodb/test/integ.global-replicas-provisioned 2.532s
@aws-cdk-testing/framework-integ: Resources
@aws-cdk-testing/framework-integ: [~] AWS::Lambda::Function OnEventHandler42BEBAE0
@aws-cdk-testing/framework-integ: └─ [~] Code
@aws-cdk-testing/framework-integ: └─ [~] .S3Key:
@aws-cdk-testing/framework-integ: ├─ [-] 7e256f5e4a92713cc232cd23819cb666756ee6023ce380130abac3b6a3fcea6a.zip
@aws-cdk-testing/framework-integ: └─ [+] 7ecc77636deefb31954ea2e6aadf6d2c361a2943535a678d65f46a8de5e1f503.zip
@aws-cdk-testing/framework-integ: [~] AWS::Lambda::Function IsCompleteHandler7073F4DA
@aws-cdk-testing/framework-integ: └─ [~] Code
@aws-cdk-testing/framework-integ: └─ [~] .S3Key:
@aws-cdk-testing/framework-integ: ├─ [-] 7e256f5e4a92713cc232cd23819cb666756ee6023ce380130abac3b6a3fcea6a.zip
@aws-cdk-testing/framework-integ: └─ [+] 7ecc77636deefb31954ea2e6aadf6d2c361a2943535a678d65f46a8de5e1f503.zip
@aws-cdk-testing/framework-integ:
@aws-cdk-testing/framework-integ:
@aws-cdk-testing/framework-integ: CHANGED aws-dynamodb/test/integ.global 2.561s
@aws-cdk-testing/framework-integ: Resources
@aws-cdk-testing/framework-integ: [~] AWS::CloudFormation::Stack awscdkawsdynamodbReplicaProviderNestedStackawscdkawsdynamodbReplicaProviderNestedStackResource18E3F12D
@aws-cdk-testing/framework-integ: └─ [~] TemplateURL
@aws-cdk-testing/framework-integ: └─ [~] .Fn::Join:
@aws-cdk-testing/framework-integ: └─ @@ -9,6 +9,6 @@
@aws-cdk-testing/framework-integ: [ ] {
@aws-cdk-testing/framework-integ: [ ] "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1"
@aws-cdk-testing/framework-integ: [ ] },
@aws-cdk-testing/framework-integ: [-] "/2d2187472236ea907da93f0398d9237e06c266540258f4ed7ac24cd4ef9dcabb.json"
@aws-cdk-testing/framework-integ: [+] "/85cd6b466d0c362b83cedb76074823dd89cccb47cbf551109abb90e8406bcd3d.json"
@aws-cdk-testing/framework-integ: [ ] ]
@aws-cdk-testing/framework-integ: [ ] ]
@aws-cdk-testing/framework-integ:
@aws-cdk-testing/framework-integ:
@aws-cdk-testing/framework-integ: CHANGED aws-dynamodb/test/integ.global 2.561s
@aws-cdk-testing/framework-integ: Resources
@aws-cdk-testing/framework-integ: [~] AWS::Lambda::Function OnEventHandler42BEBAE0
@aws-cdk-testing/framework-integ: └─ [~] Code
@aws-cdk-testing/framework-integ: └─ [~] .S3Key:
@aws-cdk-testing/framework-integ: ├─ [-] 7e256f5e4a92713cc232cd23819cb666756ee6023ce380130abac3b6a3fcea6a.zip
@aws-cdk-testing/framework-integ: └─ [+] 7ecc77636deefb31954ea2e6aadf6d2c361a2943535a678d65f46a8de5e1f503.zip
@aws-cdk-testing/framework-integ: [~] AWS::Lambda::Function IsCompleteHandler7073F4DA
@aws-cdk-testing/framework-integ: └─ [~] Code
@aws-cdk-testing/framework-integ: └─ [~] .S3Key:
@aws-cdk-testing/framework-integ: ├─ [-] 7e256f5e4a92713cc232cd23819cb666756ee6023ce380130abac3b6a3fcea6a.zip
@aws-cdk-testing/framework-integ: └─ [+] 7ecc77636deefb31954ea2e6aadf6d2c361a2943535a678d65f46a8de5e1f503.zip
|
I don't think that's anyhow related to my change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This comes from an old build workflow.
|
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
|
This pull request has been removed from the queue for the following reason: Pull request #35080 has been dequeued. The pull request rule doesn't match anymore. The following conditions don't match anymore:
You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Follow-up of #34618 as it did not fully fix the warnings.
Change
Stop passing the deprecated property to Cfn object.
Tests
Tested on minimal stack and an actual production stack.
Fixes #34895