Repository navigation
[worker] mask secrets in the records written to worker stdout - #4782
Merged
hSATAC merged 1 commit intoOct 30, 2026
Merged
Conversation
hSATAC
commented
Oct 29, 2026
| objectMode: true, | ||
| write(_chunk: any, _encoding: BufferEncoding, callback: (error?: Error | null) => void) { | ||
| write(chunk: any, _encoding: BufferEncoding, callback: (error?: Error | null) => void) { | ||
| process.stdout.write(`${JSON.stringify(chunk)}\n`); |
Contributor
Author
There was a problem hiding this comment.
Stdout now uses the same format as the uploaded logs: same logId, no hostname. Since stdout stays on the host, I kept the format consistent across all three outputs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4782 +/- ##
==========================================
+ Coverage 75.96% 75.99% +0.04%
==========================================
Files 1064 1064
Lines 52961 52979 +18
Branches 11590 11598 +8
==========================================
+ Hits 40224 40254 +30
+ Misses 11768 11758 -10
+ Partials 969 967 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hSATAC
force-pushed
the
ash/eng-28628-mask-secrets-in-eas-in-stdoutstderr-too
branch
from
October 29, 2026 12:02
615980e to
31c2144
Compare
|
✅ Thank you for adding a changeset! |
hSATAC
marked this pull request as ready for review
October 29, 2026 12:03
brentvatne
approved these changes
Oct 29, 2026
hSATAC
deleted the
ash/eng-28628-mask-secrets-in-eas-in-stdoutstderr-too
branch
October 30, 2026 08:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The worker printed every build log record and its own job-error records to its stdout unmasked: the build logger was a child of the default logger and inherited bunyan's stdout stream. The uploaded log already went through the secrets filter; stdout did not.
Remaining part of #4634. Closes ENG-28628.
How
defaultLogger.child(), with the uploads piped from it.ws.tsdebug record that logged the whole launcher message,job.secretsincluded.Test Plan
Added worker unit coverage for masked build and worker records on stdout, a stalled stdout not blocking the uploads, circular and deep values without secrets, and the copied log level. Also ran lint, format check, TypeScript checks, and the changeset validator.