Skip to content
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

(apigatewayv2): Regression in 1.87.0 #13007

Closed
hoegertn opened this issue Feb 12, 2021 · 6 comments
Closed

(apigatewayv2): Regression in 1.87.0 #13007

hoegertn opened this issue Feb 12, 2021 · 6 comments
Assignees
Labels
@aws-cdk/aws-apigatewayv2 Related to Amazon API Gateway v2 bug This issue is a bug. p0

Comments

@hoegertn
Copy link
Contributor

The changes in #12528 introduced a regression when having the following setup:

ApiStack -> ChildStack with Lambda, HttpRoute, etc

By moving the instantiation of the HttpIntegration class to the HttpApi. _addIntegration method the scope was changed from the Route to the HttpApi object. This leads to a cyclic reference in the architecture described above.

So starting with 1.87.0 all my ApiGateway applications no longer synthesize.

Environment

  • Framework Version: 1.87.0
  • Node.js Version: v14.15.4
  • OS : macOS
  • Language (Version): TS

Other

'myapp-backend-pipeline/myapp-backend-dev/Api' depends on 'myapp-backend-pipeline/myapp-backend-dev/Api/Config' (myapp-backend-pipeline/myapp-backend-dev/Api -> myapp-backend-pipeline/myapp-backend-dev/Api/Config/Fncors/Resource.Arn, myapp-backend-pipeline/myapp-backend-dev/Api -> myapp-backend-pipeline/myapp-backend-dev/Api/Config/Fnopenapi/Resource.Arn). Adding this dependency (myapp-backend-pipeline/myapp-backend-dev/Api/Config -> myapp-backend-pipeline/myapp-backend-dev/Api/Api/Resource/Resource.Ref) would create a cyclic reference.
Error: 'myapp-backend-pipeline/myapp-backend-dev/Api' depends on 'myapp-backend-pipeline/myapp-backend-dev/Api/Config' (myapp-backend-pipeline/myapp-backend-dev/Api -> myapp-backend-pipeline/myapp-backend-dev/Api/Config/Fncors/Resource.Arn, myapp-backend-pipeline/myapp-backend-dev/Api -> myapp-backend-pipeline/myapp-backend-dev/Api/Config/Fnopenapi/Resource.Arn). Adding this dependency (myapp-backend-pipeline/myapp-backend-dev/Api/Config -> myapp-backend-pipeline/myapp-backend-dev/Api/Api/Resource/Resource.Ref) would create a cyclic reference.
    at BackendApiImplStack._addAssemblyDependency (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/stack.ts:724:13)
    at Object.addDependency (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/deps.ts:52:20)
    at BackendApiImplStack.addDependency (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/stack.ts:479:5)
    at resolveValue (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/private/refs.ts:103:12)
    at Object.resolveReferences (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/private/refs.ts:33:24)
    at Object.prepareApp (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/private/prepare-app.ts:31:3)
    at Object.synthesize (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/private/synthesis.ts:24:3)
    at myappBackendStage.synth (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/stage.ts:188:23)
    at synthNestedAssemblies (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/private/synthesis.ts:52:13)
    at synthNestedAssemblies (/Users/hoegertn/repo/myapp/backend/node_modules/@aws-cdk/core/lib/private/synthesis.ts:54:7)

This is 🐛 Bug Report

@hoegertn hoegertn added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 12, 2021
@hoegertn
Copy link
Contributor Author

ping @eladb @nija-at

@NGL321 NGL321 removed the needs-triage This issue or PR still needs to be triaged. label Feb 12, 2021
@NGL321 NGL321 changed the title (api-gatewayv2): Regression in 1.87.0 (apigatewayv2): Regression in 1.87.0 Feb 12, 2021
@github-actions github-actions bot added the @aws-cdk/aws-apigatewayv2 Related to Amazon API Gateway v2 label Feb 12, 2021
@NGL321 NGL321 added the p0 label Feb 12, 2021
@NetaNir
Copy link
Contributor

NetaNir commented Feb 12, 2021

@hoegertn Thanks for letting us know, and for tagging the right people! Much appreciated. While we look into this - can you share a repro?

@NGL321
Copy link
Contributor

NGL321 commented Feb 12, 2021

Tracking in #13021

@hoegertn
Copy link
Contributor Author

@hoegertn Thanks for letting us know, and for tagging the right people! Much appreciated. While we look into this - can you share a repro?

https://github.com/hoegertn/httproute-regression

@nija-at
Copy link
Contributor

nija-at commented Feb 15, 2021

Thanks for reporting @hoegertn. I'm looking into fixing this.

Let's continue tracking this here - #13021

@nija-at nija-at closed this as completed Feb 15, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-apigatewayv2 Related to Amazon API Gateway v2 bug This issue is a bug. p0
Projects
None yet
Development

No branches or pull requests

4 participants