Skip to content

CLI: Explicitly tell whether smoke tests passed or failed#34419

Merged
Sidnioulz merged 2 commits into
nextfrom
agentic/smoke-test-output
Apr 1, 2026
Merged

CLI: Explicitly tell whether smoke tests passed or failed#34419
Sidnioulz merged 2 commits into
nextfrom
agentic/smoke-test-output

Conversation

@Sidnioulz
Copy link
Copy Markdown
Contributor

@Sidnioulz Sidnioulz commented Mar 31, 2026

What I did

Ensured smoke test output is clear and legible, especially when no problems are found.

This helps agents run smoke tests and conclude all is well.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

ø

Manual testing

Run storybook dev --smoke-test on the monorepo

image

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Bug Fixes

    • Improved smoke-test reporting: failures now emit an error and detailed logs, while successful runs show a clear success message.
  • Chores

    • Standardized build output formatting to ensure a consistent outro/message is printed for both pass and fail outcomes.

@Sidnioulz Sidnioulz requested a review from yannbf March 31, 2026 14:21
@Sidnioulz Sidnioulz added the maintenance User-facing maintenance tasks label Mar 31, 2026
Copilot AI review requested due to automatic review settings March 31, 2026 14:21
@Sidnioulz Sidnioulz added the ci:normal Run our default set of CI jobs (choose this for most PRs). label Mar 31, 2026
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 31, 2026

View your CI Pipeline Execution ↗ for commit 513b3c2

Command Status Duration Result
nx run-many -t compile,check,knip,test,lint,fmt... ✅ Succeeded 8m 14s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-01 08:00:19 UTC

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves the CLI output for --smoke-test runs so it explicitly reports whether smoke tests passed or failed, making results easier to interpret (especially in automated/agent runs).

Changes:

  • Add explicit success/failure messaging for smoke test results.
  • Use CLI_COLORS formatting and ensure an outro is printed before exiting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread code/core/src/core-server/build-dev.ts Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 56aa1e21-44eb-417e-825f-91881d07fe2b

📥 Commits

Reviewing files that changed from the base of the PR and between 0538a15 and 513b3c2.

📒 Files selected for processing (1)
  • code/core/src/core-server/build-dev.ts

📝 Walkthrough

Walkthrough

Conditionalized smoke-test reporting in buildDevStandalone: failures now log an error and stack traces; successes log a colored success step. A blank logger.outro('') is emitted before process.exit(...). CLI_COLORS was added to the logger imports.

Changes

Cohort / File(s) Summary
Smoke-test Result Handling
code/core/src/core-server/build-dev.ts
Changed smoke-test branch to check problems.length > 0; on failure call logger.error('Smoke tests failed.') and log aggregated stacks, on success call logger.step(CLI_COLORS.success('Smoke Tests passed, exiting.')). Added logger.outro('') before process.exit(...) and imported CLI_COLORS from storybook/internal/node-logger.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

@storybook-app-bot
Copy link
Copy Markdown

storybook-app-bot Bot commented Mar 31, 2026

Package Benchmarks

Commit: 513b3c2, ran on 1 April 2026 at 08:01:32 UTC

The following packages have significant changes to their size or dependencies:

storybook

Before After Difference
Dependency count 50 50 0
Self size 20.51 MB 20.47 MB 🎉 -35 KB 🎉
Dependency size 16.55 MB 16.55 MB 0 B
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 184 184 0
Self size 782 KB 782 KB 0 B
Dependency size 67.73 MB 67.70 MB 🎉 -35 KB 🎉
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 177 177 0
Self size 32 KB 32 KB 🚨 +36 B 🚨
Dependency size 66.26 MB 66.22 MB 🎉 -35 KB 🎉
Bundle Size Analyzer Link Link

create-storybook

Before After Difference
Dependency count 51 51 0
Self size 1.04 MB 1.04 MB 🚨 +72 B 🚨
Dependency size 37.06 MB 37.03 MB 🎉 -35 KB 🎉
Bundle Size Analyzer node node

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

LGTM!

@Sidnioulz Sidnioulz merged commit 9e50a60 into next Apr 1, 2026
125 checks passed
@Sidnioulz Sidnioulz deleted the agentic/smoke-test-output branch April 1, 2026 12:48
@github-actions github-actions Bot mentioned this pull request Apr 1, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal Run our default set of CI jobs (choose this for most PRs). maintenance User-facing maintenance tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants