Closed rtpascual closed 6 days ago
Latest commit: 9c33558adbc11cc9ca1225774b1dde8ebff44624
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
cross-posting to main thread, for the jsdoc @default
, is "function"
a valid value? we can show the default is undefined if not https://github.com/aws-amplify/amplify-backend/pull/2233/files#diff-9e302baf9085cc0328df9e0e7779db3be80f85e6ec8157baffae911472642f51R30
cross-posting to main thread, for the jsdoc
@default
, is"function"
a valid value? we can show the default is undefined if not https://github.com/aws-amplify/amplify-backend/pull/2233/files#diff-9e302baf9085cc0328df9e0e7779db3be80f85e6ec8157baffae911472642f51R30
Problem
Certain usage patterns with functions end up with
Caused By: ❌ Deployment failed: Error [ValidationError]: Circular dependency between resources: ...
This happens in scenarios where it could be avoided if functions created with
defineFunction
were not in the same stack.Issue number, if available:
Changes
Add
resourceGroupName
prop todefineFunction
in order to provide the flexibility to designate a stack for a function resource.Also introduces
AmplifyResourceGroupName
type which has default Amplify resource group names for each resource (example:defineData
's resourceGroupName = 'data') that will show up in IntelliSense:So with
defineFunction
it will be possible to:resourceGroupName = 'auth'
)Corresponding docs PR, if applicable:
Validation
Two new E2E test projects for common use cases that run into circular dependency issues:
circular-dep-auth-data-func
andcircular-dep-data-func
. I have them in two separate projects instead of one to isolate use cases. I also considered usingTestProjectBase.getUpdates
to swap out all files from one use case to another to keep things in one project but this will take longer to run.Checklist
run-e2e
label set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.