rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush] RFC: Advanced CLI status reporting

Open dmichon-msft opened this issue 5 months ago • 3 comments

Current Design

In large monorepos, monitoring status of an ongoing build becomes difficult, especially under verbose logging. The header between operations is the only indicator provided to the developer of the status of the build, and currently it only reports how many tasks have reported statuses and how many are in the total scope:

==[ run-scenarios-helpers (test) ]==============================[ 69 of 334 ]==

Proposed Design

We can leverage the available characters in this header and the information density of modern emoji to provide a more concise status indication for the build:

==[ run-scenarios-helpers (test) ]====================[✅42 ❌2 ⛔25 ⏳263]==

Proposed emoji (subject to negotiation):

  • ✅ SUCCESS / FROM CACHE / SKIPPED / NO OP
  • ⚠️ SUCCESS WITH WARNINGS
  • ❌ FAILURE
  • ⛔ BLOCKED
  • ⏳ (status not yet reported, including the entry this is the header for)

For future extensibility, we could make the status -> emoji mapping definable in a config file.

The code to be modified: https://github.com/microsoft/rushstack/blob/78b5b1aab30388f987efbd94b6bfd9b0f066d390/libraries/rush-lib/src/logic/operations/OperationExecutionManager.ts#L201-L221

dmichon-msft avatar Jul 30 '25 21:07 dmichon-msft

==[ run-scenarios-helpers (test) ]====================[✅42 ❌2 ⛔25 ⏳263]==

Love it 👍 👍

For future extensibility, we could make the status -> emoji mapping definable in a config file.

This seems like overengineering. Better to have one well-designed convention rather than every repo doing its own thing.

octogonz avatar Jul 30 '25 21:07 octogonz

How would ⚠️ be used?

Does ✅42 become ⚠️43 after the first warning is encountered?

octogonz avatar Jul 30 '25 21:07 octogonz

@dmichon-msft pointed out that rush build --timeline has a related iconography:

From ConsoleTimelinePlugin.ts

/* Sample output:
==============================================================================================================================
          @rushstack/tree-pattern (build) ###########-------------------------------------------------------------------- 3.3s
          @rushstack/eslint-patch (build) ########----------------------------------------------------------------------- 2.2s
           @rushstack/eslint-patch (test) -------%----------------------------------------------------------------------- 0.0s
@rushstack/eslint-plugin-security (build) ----------########################--------------------------------------------- 6.8s
@rushstack/eslint-plugin-packlets (build) ----------############################----------------------------------------- 8.1s
         @rushstack/eslint-plugin (build) ----------##############################--------------------------------------- 8.7s
           @rushstack/tree-pattern (test) ----------#####---------------------------------------------------------------- 1.2s
 @rushstack/eslint-plugin-security (test) ---------------------------------############---------------------------------- 3.3s
 @rushstack/eslint-plugin-packlets (test) -------------------------------------#####------------------------------------- 1.1s
         @rushstack/eslint-config (build) ---------------------------------------%--------------------------------------- 0.0s
          @rushstack/eslint-plugin (test) ---------------------------------------#############--------------------------- 3.8s
          @rushstack/eslint-config (test) ---------------------------------------%--------------------------------------- 0.0s
     @rushstack/node-core-library (build) ---------------------------------------################################-------- 9.5s
      @rushstack/node-core-library (test) ----------------------------------------------------------------------######### 2.2s
==============================================================================================================================
LEGEND:                                                                                                      Total Work: 50.3s
  [#] Success  [!] Failed/warnings  [%] Skipped/cached/no-op                                                 Wall Clock: 23.7s
                                                                                                       Max Parallelism Used: 5
                                                                                                     Avg Parallelism Used: 2.1

https://github.com/microsoft/rushstack/blob/78b5b1aab30388f987efbd94b6bfd9b0f066d390/libraries/rush-lib/src/logic/operations/ConsoleTimelinePlugin.ts#L78-L90

👉 HOWEVER, its requirements seem a bit different from #5292. If we improve its design to use Unicode, maybe we would use something like box-drawing characters instead.

octogonz avatar Jul 30 '25 21:07 octogonz