Skip to content

[operation-graph] Add Rush-compatible operation statuses#5889

Open
bmiddha wants to merge 1 commit into
mainfrom
bmiddha/ws0-t5-converge-operation-graph
Open

[operation-graph] Add Rush-compatible operation statuses#5889
bmiddha wants to merge 1 commit into
mainfrom
bmiddha/ws0-t5-converge-operation-graph

Conversation

@bmiddha

@bmiddha bmiddha commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

Prepare @rushstack/operation-graph for eventual convergence with rush-lib's stateful operation graph by adding the four operation statuses currently defined only by Rush.

This is intentionally a small, non-blocking first increment. It does not change rush-lib or replace its OperationGraph.

Details

  • Add Queued, SuccessWithWarning, Skipped, and FromCache to OperationStatus, using the exact string values already used by rush-lib.
  • Extend the package's exhaustive requestRun status handling so the new values remain type-safe.
  • Keep existing execution behavior unchanged: no current @rushstack/operation-graph path starts emitting any new status.
  • Record the additive @beta API change as a minor change and update the API report.

The two graph implementations remain structurally different: Rush requires persistent iteration state, selective invalidation, weighted concurrency, and a larger hook/runner contract. Those pieces should converge through later additive APIs and compatibility adapters rather than a big-bang replacement.

How it was tested

  • node common/scripts/install-run-rush.js test --to @rushstack/operation-graph
  • cd libraries/operation-graph && node_modules/.bin/heft test --clean (27 passed, 0 failed)
  • cd apps/heft && node_modules/.bin/heft build --clean
  • node common/scripts/install-run-rush.js test --to @microsoft/rush-lib --to @rushstack/operation-graph
  • node common/scripts/install-run-rush.js change --verify

No snapshots changed.

Add Rush's queued, warning, skipped, and cache statuses to the standalone enum and cover them in exhaustive rerun handling. Existing execution paths continue to emit the same statuses.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
*/
SuccessWithWarning = 'SUCCESS WITH WARNINGS',
/**
* The Operation was skipped via legacy incremental build logic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not really legacy anymore, since we use it in some of the frontier strategies.

Comment on lines +52 to +56
Skipped = 'SKIPPED',
/**
* The Operation had its outputs restored from the build cache.
*/
FromCache = 'FROM CACHE'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think in the long term these should be flags, not statuses, since the overall status should still typically be "Success" or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

2 participants