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

fix(cli): cdk watch constantly prints 'messages suppressed' #18486

Merged
merged 3 commits into from
Jan 19, 2022
Merged

fix(cli): cdk watch constantly prints 'messages suppressed' #18486

merged 3 commits into from
Jan 19, 2022

Conversation

corymhall
Copy link
Contributor

@corymhall corymhall commented Jan 18, 2022

Currently if filterLogEvents returns a nextToken then we print
(...messages suppressed...). According to the docs "This operation
can return empty results while there are more log events available
through the token.".

This fix adds a condition to only print out the suppression message if
filterLogEvents returns non-empty results.

Also updates the message to be more descriptive.

fixes #18451


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

… non-empty response

Currently if `filterLogEvents` returns a nextToken then we print
`(...messages suppressed...)`. According to the docs "This operation
can return empty results while there are more log events available
through the token.".

This fix adds a condition to only print out the suppression message if
`filterLogEvents` returns non-empty results.

Also fixes the spelling of `suppressed`.

fixes #18451
@gitpod-io
Copy link

gitpod-io bot commented Jan 18, 2022

@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jan 18, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 18, 2022
@corymhall corymhall requested a review from a team January 18, 2022 13:14
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

@rix0rrr rix0rrr changed the title fix(cli): only notify of suppressed logs if filterLogEvents returns a non-empty response fix(cli): cdk watch constantly prints 'messages suppressed' Jan 18, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 18, 2022

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).

Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we actually change the message here?

I think ...messages suppressed... is too cryptic - customers don't understand what that means.

events.push({
message: '(...messages supressed...)',
message: '(...messages suppressed...)',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to something like:

Suggested change
message: '(...messages suppressed...)',
message: '>>> `watch` shows only the first 100 log messages - the rest have been truncated...',

Feel free to word-smith the exact wording, of course.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skinny85 updated.

@corymhall corymhall requested a review from skinny85 January 18, 2022 17:19
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mergify
Copy link
Contributor

mergify bot commented Jan 18, 2022

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: aefca3d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 9b266f4 into aws:master Jan 19, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 19, 2022

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).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
)

Currently if `filterLogEvents` returns a nextToken then we print
`(...messages suppressed...)`. According to the docs "This operation
can return empty results while there are more log events available
through the token.".

This fix adds a condition to only print out the suppression message if
`filterLogEvents` returns non-empty results.

Also updates the message to be more descriptive.

fixes aws#18451


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(cli): cdk watch shows "...messages supressed..." logs infinitely
4 participants