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

avoid showing repeated messages #16118

Merged
merged 2 commits into from May 6, 2024
Merged

Conversation

tgummerer
Copy link
Collaborator

Sometimes we show hundreds of repeated messages in the logs, e.g. "waiting for quiescence; 3 outputs outstanding". This just makes the logs harder to read. Since we need to wait for the test to finish before any of this is shown anyway, only log each message once and show a little blurb about how often the message has been repeated.

(Note that for simplicity if the last message is repeated we don't show the same blurb, but that should be okay since the last messages we're logging are always different.)

Based on #16117 where I noticed this, and I didn't want to rebase it to avoid conflicts.

@tgummerer tgummerer requested a review from a team as a code owner May 3, 2024 16:30
@tgummerer tgummerer added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label May 3, 2024
@pulumi-bot
Copy link
Contributor

pulumi-bot commented May 3, 2024

Changelog

[uncommitted] (2024-05-06)

@@ -66,6 +69,15 @@ func (e *hostEngine) Log(_ context.Context, req *pulumirpc.LogRequest) (*pbempty
}
}

if e.previousMessage == message {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We're intentionally using the shortened message here, since we don't want to keep a large amount of data in memory.

Base automatically changed from tg/shorten-output to master May 6, 2024 09:30
Sometimes we show hundreds of repeated messages in the logs,
e.g. "waiting for quiescence; 3 outputs outstanding".  This just makes
the logs harder to read.  Since we need to wait for the test to finish
before any of this is shown anyway, only log each message once and
show a little blurb about how often the message has been
repeated.

(Note that for simplicity if the last message is repeated we don't
show the same blurb, but that should be okay since the last messages
we're logging are always different.)
@tgummerer tgummerer force-pushed the tg/avoid-repeated-messages branch from 31c7b5c to 99692e9 Compare May 6, 2024 11:45
@tgummerer tgummerer enabled auto-merge May 6, 2024 11:45
@tgummerer tgummerer added this pull request to the merge queue May 6, 2024
@tgummerer tgummerer removed this pull request from the merge queue due to a manual request May 6, 2024
@tgummerer tgummerer force-pushed the tg/avoid-repeated-messages branch from 13516ec to 9283e49 Compare May 6, 2024 12:55
@tgummerer tgummerer added this pull request to the merge queue May 6, 2024
Merged via the queue into master with commit b072edb May 6, 2024
49 checks passed
@tgummerer tgummerer deleted the tg/avoid-repeated-messages branch May 6, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants