-
Notifications
You must be signed in to change notification settings - Fork 666
fix: remove progress and control codes from log output #4699
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
base: main
Are you sure you want to change the base?
fix: remove progress and control codes from log output #4699
Conversation
This commit removes some not very useful output from the `/var/log/user-data.log` output that looks like this: ``` 1 file(s) remaining ^MCompleted 6.2 MiB/214.5 MiB (22.3 MiB/s) with 1 file(s) remaining ^MCompleted 6.5 MiB/214.5 MiB (23.1 MiB/s) with 1 file(s) remaining ^MCompleted 6.8 MiB/214.5 MiB (23.9 MiB/s) with 1 file(s) remaining ``` This goes on for potentially several screens worth of log output. It also similar progress bar output from the IMDS token fetching, and as a bonus side effect, prevents the token itself from being persisted to the logs. Finally, quotes are added around some of the values returned by curl to prevent bash from splitting it if there's whitespace in the return value and subsequent unintentional behaviour.
Also, there's a number of other shellcheck violations in this file (which is odd because there is a |
No clue why the check is there, no linters for the scripts are active, so assume it is useless. But maybe better to fix in a another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR cleans up log output by removing verbose progress indicators and control characters from the user-data.log. The changes make logs more readable by suppressing curl progress output and AWS S3 transfer progress, while also adding proper quoting to prevent bash word splitting issues.
- Suppresses curl progress output using the
-s
flag - Disables AWS S3 copy progress output with
--no-progress
- Adds proper quoting around curl command substitutions to prevent word splitting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aarongorka looks good, any thought about the copliot suggestion before merging?
Is there anything else I need to do to get this merged or can I leave it with you @npalm ? |
This commit removes some not very useful output from the
/var/log/user-data.log
output that looks like this:This goes on for potentially several screens worth of log output.
It also removes a similar progress bar output from the IMDS token fetching, and as a bonus side effect, prevents the token itself from being persisted to the logs.
Finally, quotes are added around some of the values returned by curl to prevent bash from splitting it if there's whitespace in the return value and subsequent unintentional behaviour.