Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: reduce log volume on server startup #16608

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

Merged
merged 7 commits into from
Feb 20, 2025

Conversation

hugodutka
Copy link
Contributor

@hugodutka hugodutka commented Feb 18, 2025

Addresses #16231.

This PR reduces the volume of logs we print after server startup in order to surface the web UI URL better.

Here are the logs after the changes a couple of seconds after starting the server:

Screenshot 2025-02-18 at 16 31 32

The warning is due to running a development site-less build. It wouldn't show in a release build.

@hugodutka hugodutka force-pushed the hugodutka/reduce-log-volume-on-startup branch 4 times, most recently from bfaffb7 to e18ef6f Compare February 18, 2025 17:13
@hugodutka hugodutka marked this pull request as ready for review February 18, 2025 17:18
@hugodutka hugodutka requested a review from mafredri February 18, 2025 17:18
@hugodutka hugodutka force-pushed the hugodutka/reduce-log-volume-on-startup branch 2 times, most recently from 5c7de02 to b1b217b Compare February 18, 2025 18:02
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Some nice changes in here, thanks. Had a few comments/concerns and CC'd @johnstcn and @spikecurtis on the ones I was uncertain about.

Hmm, looks like something went awry with the review. ccs for Cian on crypto, Spike on tailnet seem to be gone 😅 .

Copy link
Contributor

@spikecurtis spikecurtis left a comment

Choose a reason for hiding this comment

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

Ok from my perspective

@hugodutka hugodutka force-pushed the hugodutka/reduce-log-volume-on-startup branch 3 times, most recently from 54b3e03 to 2f31144 Compare February 19, 2025 14:15
@hugodutka hugodutka force-pushed the hugodutka/reduce-log-volume-on-startup branch from 2f31144 to c9033d8 Compare February 20, 2025 10:45
slog.F("max_version", maxTerraformVersion.String()))
// When running in-memory provisioners, each one reaches this point.
// It's not useful to print this to the user multiple times, so we ensure to log it once.
if !loggedVersion.Swap(true) {
Copy link
Member

Choose a reason for hiding this comment

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

It's possible now that we end up logging on a minor terraform version mis-match, in which case we end up downloading a newer one and this log ends up reporting incorrect information.

Perhaps it's better moved to Serve?

PS. If we can avoid the package level state, that'd be great (for instance, can be a source of flaky tests).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't address this one yet - let me fix that before merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mafredri done!

@hugodutka hugodutka force-pushed the hugodutka/reduce-log-volume-on-startup branch from c9033d8 to eaac36e Compare February 20, 2025 12:39
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Thanks!

@hugodutka hugodutka force-pushed the hugodutka/reduce-log-volume-on-startup branch from eaac36e to e019f3c Compare February 20, 2025 13:11
@hugodutka hugodutka force-pushed the hugodutka/reduce-log-volume-on-startup branch from e019f3c to 1e6d7ec Compare February 20, 2025 13:34
@hugodutka hugodutka merged commit 4449931 into main Feb 20, 2025
30 checks passed
@hugodutka hugodutka deleted the hugodutka/reduce-log-volume-on-startup branch February 20, 2025 15:33
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants