-
Notifications
You must be signed in to change notification settings - Fork 5k
Add shard duration warning to markdown reporter #38769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…tion warnings Co-authored-by: Skn0tt <[email protected]>
Co-authored-by: Skn0tt <[email protected]>
| const shardLabel = shard.shardIndex !== undefined ? `Shard ${shard.shardIndex}` : 'Shard'; | ||
| const durationMins = Math.round(shard.duration / 60000); | ||
| const thresholdMins = Math.round(this._options.shardDurationThreshold / 60000); | ||
| lines.push(`:warning: **Warning: ${shardLabel} took ${durationMins} minutes, exceeding the ${thresholdMins} minute threshold.**`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this closer to fatal errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the shard duration warning to appear before fatal errors in de1e9c9.
tests/config/ghaMarkdownReporter.ts
Outdated
|
|
||
| class GHAMarkdownReporter extends MarkdownReporter { | ||
| constructor(options: { configDir: string, outputFile?: string, shardDurationThreshold?: number }) { | ||
| super({ ...options, shardDurationThreshold: options.shardDurationThreshold ?? 25 * 60 * 1000 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll never be passed options here, just specify the threshhold directly, don't take options in the constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplified the constructor to directly specify the 25-minute threshold without taking it as an option in de1e9c9.
Co-authored-by: Skn0tt <[email protected]>
| constructor(options: { configDir: string, outputFile?: string }) { | ||
| super({ ...options, shardDurationThreshold: 25 * 60 * 1000 }); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| constructor(options: { configDir: string, outputFile?: string }) { | |
| super({ ...options, shardDurationThreshold: 25 * 60 * 1000 }); | |
| } | |
| constructor() { | |
| super({ shardDurationThreshold: 25 * 60 * 1000 }); | |
| } | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied your suggestion in 86bdc12.
Co-authored-by: Skn0tt <[email protected]>
|
@copilot i'm sorry, please revert that last change. configDir needs to be passed through |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Skn0tt <[email protected]>
Test results for "MCP"2822 passed, 116 skipped Merge workflow run. |
Test results for "tests 1"4 failed 6 flaky34447 passed, 696 skipped Merge workflow run. |
shardDurationThreshold?: numberoption toMarkdownReporterOptionsinmarkdown.tsmarkdown.ts'sonEndmethod when any shard exceeds the thresholdghaMarkdownReporter.tswith 25-minute threshold (1500000 ms)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.