Skip to content

CI: Cancel workflow when format check fails - #36664

Merged
valentinpalkovic merged 1 commit into
nextfrom
fix/circleci-format-fail-fast
Oct 7, 2026
Merged

valentinpalkovic merged 1 commit into
nextfrom
fix/circleci-format-fail-fast

Conversation

@valentinpalkovic

Copy link
Copy Markdown
Contributor

What I did

Cancel the current CircleCI workflow when format-check fails, using the same workflow.cancelOnFailure() helper as type checking and unit tests. Successful runs retain their existing parallelism. This uses the existing WORKFLOW_CANCELER credential.

Validation: generated and parsed the docs, normal, merged, and daily configurations; verified that each format job has exactly one on_fail cancellation step after yarn fmt:check. Focused formatting and lint checks passed. Live CircleCI cancellation still needs the manual check below.

Checklist for Contributors

Testing

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

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  1. Run CI on a temporary branch with a deliberate formatting error and the existing WORKFLOW_CANCELER credential available.
  2. Confirm format-check fails, runs Cancel current workflow, and stops the remaining workflow jobs.
  3. Fix the formatting error and rerun. Confirm the cancellation step is skipped and the other jobs proceed normally.

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

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

  • Declare whether manual QA will be needed for this PR during the next release, through qa:needed or qa:skip

  • 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 - 🚫 Not run

This PR does not have a canary release associated.

In-repo PRs: add the ci:canary label. Later pushes republish while the label remains.

Fork PRs: the label does nothing (a later push must not auto-publish). A maintainer publishes from this repository with Run workflow and the pr input. branch and sha are optional; if more than one is set, they must be the same commit. The fork author does not need to do anything.

@valentinpalkovic valentinpalkovic added build Internal-facing build tooling & test updates ci:normal Run our default set of CI jobs (choose this for most PRs). qa:needed Pull Requests that will need manual QA prior to release. labels Oct 7, 2026 — with Paperclip for GitHub
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5b12831e-cb88-4cc9-a864-a19610d6f901
📥 Commits

Reviewing files that changed from the base of the PR and between 7dc0370 and de305a2.

📒 Files selected for processing (1)
  • scripts/ci/common-jobs.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The fmt job now calls workflow.cancelOnFailure() after the format-check step.

Changes

Format job cancellation

Layer / File(s) Summary
Add cancellation to the format job
scripts/ci/common-jobs.ts
The fmt job calls workflow.cancelOnFailure() after the format-check step.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to de305

No identified issue blocks merging. A failed format check is configured to request workflow cancellation; its live effect has not been confirmed.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@valentinpalkovic valentinpalkovic self-assigned this Oct 7, 2026
@valentinpalkovic
valentinpalkovic merged commit 04ad1e8 into next Oct 7, 2026
52 of 85 checks passed
@valentinpalkovic
valentinpalkovic deleted the fix/circleci-format-fail-fast branch October 7, 2026 19:07
@github-actions github-actions Bot mentioned this pull request Oct 7, 2026
2 tasks done
@obvious-autobuild

Copy link
Copy Markdown
Contributor

Delegate feedback — PR #36663 confidence escalation (normal-generated / test-storybooks-portable-vue3)

What failed: On head 6916a7de643c (PR #36663, SB-2013 viewport legacy removal), exactly 1 of 88 jobs failed: test-storybooks-portable-vue3 (workflow normal-generated, CircleCI build 2226989). The other 87 jobs passed, including vue-v3--vite---typescript---vitest (same addon-vitest viewport plugin), test-storybooks-portable-react/nextjs/svelte, and all other vitest jobs.

Log access blocked: CircleCI job logs are auth-gated (anonymous v1.1/v2 endpoints 404; web page requires login), so the snackbar could not be inspected directly. The [ci_failure_details.py diagnostic] reports logsAvailable=false for this run.

Prevalence evidence for a flaky/infra cause: On clean next commits this same afternoon, CI used chore: retrigger CI after CircleCI infrastructure failure (a13b3fc — single vue-sandbox job failed: vue-v3--vite---typescript---dev) and chore: retrigger CI after flaky onboarding E2E in the Vue sandbox (3e4d601). Vue-family sandbox jobs failing on infra grounds has direct precedent today.

Why a code regression is unlikely: 5 sibling vitest jobs exercising the same changed plugin code passed on this same head; portable-react/portable-nextjs/portable-svelte passed unchanged; every failure found on clean next commits today was also a vue-family sandbox job.

Requested action (runnable): rerun the failed CircleCI job via GitHub Actions:
gh run rerun 37670403100 -R storybookjs/storybook --failed — or from the PR page, use the failed check's re-run button on normal-generated.

Any failing delegate idea that turns out to be snackbar is always escalation (or retry-with-changed-factors), never a clear. Delegates: if you find the actual root cause instead of a flake, escalate that directly.

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 ci:normal Run our default set of CI jobs (choose this for most PRs). qa:needed Pull Requests that will need manual QA prior to release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants