-
Notifications
You must be signed in to change notification settings - Fork 4k
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(integ-tests): optionaly install latest aws SDK when using integ-test AwsApiCall #22443
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.
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.
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
Build failed due to salt on custom resource params added a context key check to allow a static salt to be set. used: '@aws-cdk/core:assetHashSalt' as it has been used before, might want to use a unique key. but not sure. |
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.
Thanks Neil! Looks good! I want to run this past Cory though to check out the need for the salt context parameter, that's not what that should be used for methinks.
const salt = this.node.tryGetContext(ASSET_SALT_CONTEXT_KEY); | ||
|
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.
Why this? It's not what that key was intended for.
But I think I do see: is it because otherwise one cannot get a stable snapshot of the template?
If so, this needs @corymhall in here, who's currently the deepest into integ testing. The integ testing facilities should automatically be producing consistent values whenever they know their snapshot is going to be taken.
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.
yes your right... i thought i might need to use another way or use another key..
It is due to the snapshot test stability.
stems from the salt = Date.now()
perhaps if we could have some way to make code aware it was in integ-runner other than context. Something like jest.spyOn() to help make Date.now() static was another thought.
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 think for this I would rather make the runner aware of the assertions. On diff it could just ignore the salt (like we do for asset hashes).
Allows Vpc to Use [Aws IPAM](https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html) for Ip address assignment: ```ts import { IpAddresses } from '@aws-cdk/aws-ec2'; declare const pool: ec2.CfnIPAMPool; new ec2.Vpc(stack, 'TheVPC', { ipAddresses: ec2.IpAddresses.awsIpamAllocation({ ipv4IpamPoolId: pool.ref, ipv4NetmaskLength: 18, defaultSubnetIpv4NetmaskLength: 24 }) }); ``` This is useful for enterprise users that wish to adopt the benefits of centralised IP address management. It introduces `ipAddresses` property to allow the new configuration. ---- Thanks to @rix0rrr for support on this. --- closes #21333 ---- #22443 - Issue adds a fix to allow the clean up of the AWS Ipam resource used in ingeg-test testing. Would be better to implement something like this later. for now disclaimer added to integ-test clean up needed on Ipam. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### New Features * [X] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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.
Looks like the last comments on this were requesting changes so putting this into changes requested to accurately reflect the status.
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
b5b08ed
to
437c21f
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.
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.
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. |
Still working to update this.. will take a bit longer than i had hoped right now. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This PR enabled optional install of the latest AWS SDK when using AwsApiCall.
This helps when testing new features that are not supported by the default sdk in lambda runtime.
The runtime approach is similar to : custom-resource
Readme updated and test added.
Currently does not address directly the fact that the call will happen on create and then again on delete. but looks like this is addressed here.
Feature is in relation to, but not listed tracker
All Submissions:
New Features
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license