-
Notifications
You must be signed in to change notification settings - Fork 644
Description
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:
rushstack/libraries/rush-lib/src/logic/operations/OperationExecutionManager.ts
Lines 201 to 221 in 78b5b1a
// 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
Labels
Type
Projects
Status