-
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
fix(custom-resource-handlers): better fallback for require failures #30095
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.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
Clarification Request I am not sure I understand how to run/resolve the integration test snapshots - would appreciate some guidance |
...and it seems the pr-linter-exception-labeler action may be broken too - it's failing with an error |
@glitchassassin Thanks for drafting the PR. The CodeBuild CI failed because you updated the custom resource handler file, which means the code hash of the handler file changes. This results in all these integration tests that uses this custom resource when comparing the snapshots. What you can do is to look at the build log and search for More can be found in https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md. |
Thanks Gavin. I ran the integration tests like this and then committed the results: yarn integ custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js --disable-update-workflow --update-on-failed I got a SUCCESS message locally for most of them. A few failed with an error similar to this:
I pushed up the changes for the ones that passed, but it looks like CodeBuild is still failing all of those integration tests. Have I missed a step? |
Prior to running the integ tests, did you run |
I'm pretty sure I did, but just in case, I re-ran the build and tried the integration tests again. I'm not seeing any differences. I noticed that on some of them (e.g. aws-elasticloadbalancingv2/test/integ.alb.oidc.js) the build reports "destructive changes" because I provided a different hosted zone/domain name per framework-integ/README.md. I'm not sure how to resolve this. |
For the breaking changes, using |
yes, those changes were generated by following these steps to set the hosted zone: |
I'll open your PR branch later today and run the integ tests from my IDE. You can reach out to me on cdk.dev if you need any discussion around the PR contribution. I am more than happy to help. |
I have created a PR to your branch to update the integ tests Can you merge my PR to your branch and this PR should update immediately. Let's see if the CI would pass. |
update integ tests
OK looks like your PR got new integ error
and
You'll need to re-run all the CHANGED integ tests and update all their snapshots. I can't run all of them for you. Please reach out to me on cdk.dev slack if you need any help I can show you how to do that with a video. |
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. |
not abandoned; still working through integration test issues |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Cross-posting from the Slack discussion: I'm not sure there's a good way to test these changes in an integration test, as it's the handler source code that is changing. There is a unit test for the change, but I'm not sure how to force the error in an integration test scenario. Any suggestions, or should I request an exemption? |
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing |
|
Reopening here: #30469 |
Issue # (if applicable)
Closes #30067.
Reason for this change
Fallback to existing AWS SDK import misses a rare/flaky edge case where the npm install passes, but the subsequent
require
failsDescription of changes
Fall back to the pre-existing AWS SDK if requiring the latest version fails
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license