-
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(apigatewayv2): HttpApi and Route in different stacks creates cycles #13010
fix(apigatewayv2): HttpApi and Route in different stacks creates cycles #13010
Conversation
Title does not follow the guidelines of Conventional Commits. Please adjust title before merge. |
@eladb @nija-at I modified the code to keep the old semantic of using the route scope for the integration. But I see the benefit of the Integration being tied to the API scope. I think ideally the integration should be scoped depending on the integration type and for Lambda integrations it should be in the same scope as the function, as this causes the cyclic dependency. |
I'm curious what the benefit is?
Do you mean when the lambda is in the API scope or just any other stack? It feels reasonable to assume that the lambda function will be defined closer to the integration rather than the API. |
The set of integrations for deduplication is located at the API and integrations are possibly reused, so they should live at the top level.
The integration should live in the same stack as the Lambda function at any time. Just not sure about other integrations that are not Lambda. But I am totally happy to have integrations located at the route as in my PR, I am just not sure as I never reused integrations and want to see if this breaks other peoples workflows. |
It could also live in another stack, no? How about taking |
It references the Lambda function so it could only live in the same stack or downstream but not more to the top. Api -> Lambda -> Integ |
Agreed. |
@hoegertn Thanks for this change! I did not realise this flow while making the change. I am just curious on why have you decided to make the |
Good point. And we should make |
The |
I am just thinking if this problem would then occur in that context? Better we force the callers to pass the scope. Thoughts? |
Let's make |
Pull request has been modified.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…es (aws#13010) When the Route construct with an integration is defined in a separate stack from the one defining the HttpApi construct, a circular dependency error is thrown. The bug was introduced in - 855ce59 - where the refactor of moving the creation of Integration resulted in using the HttpApi as the scope of the Integration construct, rather than the Route. fixes aws#13021 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
When the Route construct with an integration is defined
in a separate stack from the one defining the HttpApi
construct, a circular dependency error is thrown.
The bug was introduced in - 855ce59 - where the
refactor of moving the creation of Integration resulted in
using the HttpApi as the scope of the Integration
construct, rather than the Route.
fixes #13021
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license