fix: remove progress and control codes from log output#4699
fix: remove progress and control codes from log output#4699npalm merged 1 commit intogithub-aws-runners:mainfrom
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.
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
-sflag - Disables AWS S3 copy progress output with
--no-progress - Adds proper quoting around curl command substitutions to prevent word splitting
npalm
left a comment
There was a problem hiding this comment.
@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 ? |
🤖 I have created a release *beep* *boop* --- ## [6.7.4](v6.7.3...v6.7.4) (2025-08-25) ### Bug Fixes * add handling for 404 errors in scale-down tests and improve error logging ([#4726](#4726)) ([95aa6a2](95aa6a2)) @stuartp44 * **lambda:** bump the aws group in /lambdas with 7 updates ([#4709](#4709)) ([0e74b3d](0e74b3d)) * **lambda:** bump the aws-powertools group in /lambdas with 4 updates ([#4718](#4718)) ([9a63469](9a63469)) * remove progress and control codes from log output ([#4699](#4699)) ([1c6b424](1c6b424)) @aarongorka --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
…nners#4699) 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 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.
🤖 I have created a release *beep* *boop* --- ## [6.7.4](github-aws-runners/terraform-aws-github-runner@v6.7.3...v6.7.4) (2025-08-25) ### Bug Fixes * add handling for 404 errors in scale-down tests and improve error logging ([github-aws-runners#4726](github-aws-runners#4726)) ([95aa6a2](github-aws-runners@95aa6a2)) @stuartp44 * **lambda:** bump the aws group in /lambdas with 7 updates ([github-aws-runners#4709](github-aws-runners#4709)) ([0e74b3d](github-aws-runners@0e74b3d)) * **lambda:** bump the aws-powertools group in /lambdas with 4 updates ([github-aws-runners#4718](github-aws-runners#4718)) ([9a63469](github-aws-runners@9a63469)) * remove progress and control codes from log output ([github-aws-runners#4699](github-aws-runners#4699)) ([1c6b424](github-aws-runners@1c6b424)) @aarongorka --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>

This commit removes some not very useful output from the
/var/log/user-data.logoutput 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.