Skip to content
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

feat(core): show progress on ci if graph construction takes longer than expected #29392

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AgentEnder
Copy link
Member

Progress spinners currently only show up when the terminal is a tty. This updates it to show static text on CI, but at a longer duration

@AgentEnder AgentEnder requested a review from a team as a code owner December 17, 2024 22:14
Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Dec 18, 2024 8:37pm

Copy link

nx-cloud bot commented Dec 17, 2024

Your CI Pipeline Execution ↗ for commit 0df7ef5 is in progress ⏳

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 37m View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 1s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check --base=a675b... ✅ Succeeded 22s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 21s View ↗
nx documentation --no-dte ✅ Succeeded 1m 2s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-18 21:18:21 UTC


/**
* Constructs a new {@link DelayedSpinner} instance.
*
* @param message The message to display in the spinner
* @param ms The number of milliseconds to wait before creating the spinner
*/
constructor(message: string, ms: number = 500) {
constructor(message: string, ms?: number);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this used? If not, let's get rid of this signature.

@@ -62,4 +98,4 @@ export class DelayedSpinner {
}
}

export const SHOULD_SHOW_SPINNERS = process.stdout.isTTY;
export const SHOULD_SHOW_SPINNERS = process.stdout.isTTY && !isCI();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't need to be exported anymore right?

@@ -64,7 +64,7 @@ export class DelayedSpinner {
if (this.spinner && SHOULD_SHOW_SPINNERS) {
this.spinner.text = message;
} else if (this.lastMessage && this.lastMessage !== message) {
console.log(message);
console.error(message);
Copy link
Collaborator

Choose a reason for hiding this comment

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

A warning is probably better?

@AgentEnder AgentEnder force-pushed the feat/ci-progress-indicator branch from ed64efb to 0df7ef5 Compare December 18, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants