Skip to content

[rush] RFC: Advanced CLI status reporting #5292

@dmichon-msft

Description

@dmichon-msft

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:

// Format a header like this
//
// ==[ @rushstack/the-long-thing ]=================[ 1 of 1000 ]==
// leftPart: "==[ @rushstack/the-long-thing "
const leftPart: string = Colorize.gray('==[') + ' ' + Colorize.cyan(writer.taskName) + ' ';
const leftPartLength: number = 4 + writer.taskName.length + 1;
// rightPart: " 1 of 1000 ]=="
const completedOfTotal: string = `${this._completedOperations} of ${this._totalOperations}`;
const rightPart: string = ' ' + Colorize.white(completedOfTotal) + ' ' + Colorize.gray(']==');
const rightPartLength: number = 1 + completedOfTotal.length + 4;
// middlePart: "]=================["
const twoBracketsLength: number = 2;
const middlePartLengthMinusTwoBrackets: number = Math.max(
ASCII_HEADER_WIDTH - (leftPartLength + rightPartLength + twoBracketsLength),
0
);
const middlePart: string = Colorize.gray(']' + '='.repeat(middlePartLengthMinusTwoBrackets) + '[');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    General Discussions

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions