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

Consolidate CI test output into a single string #8489

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dlarocque
Copy link
Contributor

@dlarocque dlarocque commented Sep 9, 2024

Having the stdout and stderr in a single string makes it easier to read when analyzing test failures. Currently if there's a test failure, we output stdout and stderr separately so we can't tell which errors were logged during which test.

For example, in https://github.com/firebase/firebase-js-sdk/actions/runs/10776099172/job/29882046607, there are tons of FIREBASE FATAL ERROR's logged, but I can't tell which tests are logging these errors, or if they're even what's causing the tests to fail.

Having CI test process stdout and stderr in a single string makes it
easier to read when looking through failures, since you can see the test
output alongside the error messages.

Without this, any stderr output written during a test will be captured
seperately from the test output, so when we then log it after a test
failure, we can't tell which test logged which errors.
@dlarocque dlarocque requested a review from a team as a code owner September 9, 2024 15:42
Copy link

changeset-bot bot commented Sep 9, 2024

⚠️ No Changeset found

Latest commit: 454912f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

@google-oss-bot
Copy link
Contributor

@DellaBitta
Copy link
Contributor

I'm going to defer to @hsubox76 on this one. Perhaps there was a reason to keep them separated originally?

@@ -74,27 +73,26 @@ const argv = yargs.options({
const testProcess = spawn('yarn', ['--cwd', dir, scriptName]);

testProcess.childProcess.stdout.on('data', data => {
stdout += data.toString();
testProcessOutput += data.toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if it is ever useful to know which output came out of stdout and which came out of stderr but just in case it might be, do you think we might want to append a prefix like [stdout] or [stderr] before each of these?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants