(cli): cdk watch shows "...messages supressed..." logs infinitely #18451
Labels
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p1
package/tools
Related to AWS CDK Tools or CLI
What is the problem?
Hi team, thank you very much for releasing the cool feature to monitor Lambda logs #18159!
I tried it and it's working fantastic, but noticed that it sometimes shows invalid logs infinitely. Details are below.
Could you check it when you get a chance? Thanks.
Reproduction Steps
Deploy a function with
cdk watch
, and invoke it.What did you expect to happen?
Only valid logs are displayed.
What actually happened?
After several valid logs,
...messages supressed...
logs continuously appears (say, 1 line per 2-3 seconds per function).[/aws/lambda/BackendStack-Handler2AD178334-hzcv8uEytk3K] 1:08:39 PM REPORT RequestId: c680698d-dd1a-4c64-a387-a507203ad9ac Duration: 493.33 ms Billed Duration: 494 ms Memory Size: 128 MB Max Memory Used: 79 MB [/aws/lambda/BackendStack-Handler2AD178334-hzcv8uEytk3K] 1:08:39 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler1EB1BC6C8-StOYX6oimaCD] 1:08:38 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler1EB1BC6C8-StOYX6oimaCD] 1:08:38 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler1EB1BC6C8-StOYX6oimaCD] 1:08:38 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler1EB1BC6C8-StOYX6oimaCD] 1:08:38 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler1EB1BC6C8-StOYX6oimaCD] 1:08:38 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler2AD178334-hzcv8uEytk3K] 1:08:39 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler1EB1BC6C8-StOYX6oimaCD] 1:08:38 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler2AD178334-hzcv8uEytk3K] 1:08:39 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler1EB1BC6C8-StOYX6oimaCD] 1:08:38 PM (...messages supressed...) [/aws/lambda/BackendStack-Handler2AD178334-hzcv8uEytk3K] 1:08:39 PM (...messages supressed...) # ... continues infinitely
CDK CLI Version
2.8.0
Framework Version
2.8.0
Node.js Version
16
OS
macOS
Language
Typescript
Language Version
No response
Other information
Considering this document, there is a case that
nextToken
is returned but the response is empty.Maybe we need to check the length of
response.events
here: (I'm not entirely sure thoughaws-cdk/packages/aws-cdk/lib/api/logs/logs-monitor.ts
Lines 200 to 209 in 626e6aa
The text was updated successfully, but these errors were encountered: