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

Maintenance: improve error feedback when tasks fail in CI #19786

Merged
merged 4 commits into from
Nov 9, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Nov 9, 2022

Issue: N/A

What I did

Changed the output of JUnit.XML files when there is an arbitrary code error (not a failure coming from a test)

From:

<testsuites tests="1" errors="1" failures="0" skipped="0" name="e2e-tests - react-vite/default-js" time="0.001">
  <testsuite tests="1" errors="1" failures="0" skipped="0" name="e2e-tests - react-vite/default-js" time="0.001" timestamp="2022-11-09T08:48:00.915Z">
    <testcase name="e2e-tests - react-vite/default-js" classname="react-vite/default-js e2e-tests - react-vite/default-js" time="0.001" assertions="1">
      <error>iDoNotExist is not defined</error>
    </testcase>
  </testsuite>
</testsuites>

To:

<testsuites tests="1" errors="0" failures="0" skipped="0" name="e2e-tests - react-vite/default-js" time="0.001">
    <testsuite tests="1" errors="0" failures="0" skipped="0" name="e2e-tests - react-vite/default-js" time="0.001" timestamp="2022-11-09T08:17:43.019Z">
        <testcase name="e2e-tests - react-vite/default-js" classname="react-vite/default-js react-vite/default-js react-vite/default-js e2e-tests - react-vite/default-js" time="0.001" assertions="1">
            <error>
                ReferenceError: iDoNotExist is not defined
                    at Object.run (/Users/yannbraga/open-source/storybook/scripts/tasks/e2e-tests.ts:13:17)
                    at runTask (/Users/yannbraga/open-source/storybook/scripts/task.ts:277:35)
                    at run (/Users/yannbraga/open-source/storybook/scripts/task.ts:411:34)
                    at processTicksAndRejections (node:internal/process/task_queues:96:5)
            </error>
        </testcase>
    </testsuite>
</testsuites>

image

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@yannbf yannbf added the build Internal-facing build tooling & test updates label Nov 9, 2022
@yannbf yannbf changed the title Chore/improve error feedback Maintenance: improve error feedback when tasks fail in CI Nov 9, 2022
@yannbf yannbf force-pushed the chore/improve-error-feedback branch from a88bd54 to 33bcaea Compare November 9, 2022 09:13
@yannbf yannbf force-pushed the chore/improve-error-feedback branch from 33bcaea to 0d553d9 Compare November 9, 2022 09:40
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

OK!, seems like an improvement

scripts/tasks/build.ts Outdated Show resolved Hide resolved
@yannbf yannbf force-pushed the chore/improve-error-feedback branch from 0d553d9 to 947b0c3 Compare November 9, 2022 09:58
@yannbf yannbf merged commit 49d26da into next Nov 9, 2022
@yannbf yannbf deleted the chore/improve-error-feedback branch November 9, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants