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

Merged
merged 2 commits into from
Dec 19, 2024

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 19, 2024 3:48pm

Copy link

nx-cloud bot commented Dec 17, 2024

View your CI Pipeline Execution ↗ for commit 2c7b2f8.

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

☁️ Nx Cloud last updated this comment at 2024-12-19 16:31:56 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
@AgentEnder AgentEnder force-pushed the feat/ci-progress-indicator branch from 0df7ef5 to 2c7b2f8 Compare December 19, 2024 15:46
@FrozenPandaz FrozenPandaz merged commit 3c3d2e5 into master Dec 19, 2024
6 checks passed
@FrozenPandaz FrozenPandaz deleted the feat/ci-progress-indicator branch December 19, 2024 16:34
ndcunningham pushed a commit that referenced this pull request Dec 20, 2024
…an expected (#29392)

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
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants