question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(apigatewayv2): Regression in 1.87.0

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hoegertncommented, 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?

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

0reactions
github-actions[bot]commented, Feb 15, 2021

⚠️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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk/aws-apigatewayv2 module - AWS Documentation
The API Gateway v2 service sends metrics around the performance of HTTP APIs to Amazon CloudWatch. These metrics can be referred to using...
Read more >
@aws-cdk/aws-cognito | Yarn - Package Manager
apigatewayv2: set throttling on stages (#19776 (3cabd10), closes #19626; autoscaling: Auto ... apigatewayv2: HttpIntegrationType. ... 1.87.0 (2021-01-27).
Read more >
aws-cdk.aws-apigatewayv2-integrations - PyPI
The following code configures a route GET /books with a Lambda proxy integration. from aws_cdk.aws_apigatewayv2_integrations import HttpLambdaIntegration # ...
Read more >
AWSSDK.ApiGatewayV2 3.7.100.44 - NuGet
Version Downloads Last updated 3.7.100.44 12 2 hours ago 3.7.100.43 34 a day ago 3.7.100.42 36 2 days ago
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found