-
Notifications
You must be signed in to change notification settings - Fork 825
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: add a dependsOn to custom resource for auth trigger #11504
fix: add a dependsOn to custom resource for auth trigger #11504
Conversation
serviceToken: authTriggerFn.functionArn, | ||
properties: { userpoolId: userpoolId.valueAsString, lambdaConfig: authTriggerConnections, nonce: uuid() }, | ||
resourceType: 'Custom::CustomAuthTriggerResourceOutputs', | ||
}); | ||
|
||
customResource.node.addDependency(authTriggerFn); |
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.
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.
That dependsOn will add all the dependencies of the dependency added... I'll add a test to make it clearer.
Failing test is unrelated |
e2e run from 1a37d1f: https://app.circleci.com/pipelines/github/aws-amplify/amplify-cli/13062/workflows/7134f0af-69cc-4cdc-bf13-439b1ffec2be. The only failing test is broken on |
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.
awesome!
Codecov Report
@@ Coverage Diff @@
## dev #11504 +/- ##
=======================================
Coverage 49.87% 49.87%
=======================================
Files 698 698
Lines 33791 33792 +1
Branches 6929 6929
=======================================
+ Hits 16852 16854 +2
+ Misses 15405 15404 -1
Partials 1534 1534
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…#11504) * fix: add a dependsOn to custom resource for auth trigger * test: add snapshot tests to show cfn changes for dependencies * fix: mock uuid lib in test
* fix: add a dependsOn to custom resource for auth trigger (#11504) * fix: add a dependsOn to custom resource for auth trigger * test: add snapshot tests to show cfn changes for dependencies * fix: mock uuid lib in test * fix: auth trigger template rendering Co-authored-by: Danielle Adams <[email protected]>
Description of changes
This adds a
dependsOn
for an auth category resource: Custom Resource has a dependency on Lambda trigger and its IAM resources, so they should be deployed synchronously.Issue #, if available
The issue was identified by @awsluja, who has been investigating broken/flaky tests.
Description of how you validated changes
Snapshot test unit for this behavior.
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.