GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): show flaky-task count in run summary by FrozenPandaz · Pull Request #35491 · nrwl/nx

Conversation

@FrozenPandaz

@FrozenPandaz FrozenPandaz commented Apr 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Current Behavior

Two issues in the task-history life cycle's flaky-task summary:

1. Missing count — the plural-case title rendered with two consecutive spaces and no number:

> NX  Nx detected  flaky tasks

  myproject:test
  otherproject:e2e

(Singular rendered correctly as Nx detected a flaky task.)

2. Unbounded list — when many tasks were flagged (e.g. a Gradle suite that detects all of its targets as flaky), the full list filled the terminal viewport.

Expected Behavior

Plural title shows the true count, and long lists truncate to a manageable preview:

> NX  Nx detected 8 flaky tasks

  myproject:test
  otherproject:e2e
  thirdproject:lint
  fourthproject:build
  fifthproject:e2e
  3 more...

Root Cause (count fix)

Both task-history-life-cycle.ts and the legacy task-history-life-cycle-old.ts had:

title: `Nx detected ${
  this.flakyTasks.length === 1 ? 'a flaky task' : ' flaky tasks'
}`,

The plural branch is a literal ' flaky tasks' string with a leading space and no count interpolation — so the template renders Nx detected + ' flaky tasks' = Nx detected flaky tasks (two spaces, no number).

Fixes

1. Title interpolation — replace the plural literal with `${this.flakyTasks.length} flaky tasks` so the count appears between the leading space and the word flaky. Singular wording is unchanged. Applied symmetrically in both life-cycle files.

2. List truncation (per AgentEnder's review feedback) — cap the printed body at 5 entries with a N more... collapse row when flakyTasks.length > 6. The title still shows the true total. Behavior matrix:

flakyTasks.length Body rows
1–5 all task names
6 all 6 task names (no collapse — a single "1 more..." would be sillier than just printing the row)
7 5 task names + 2 more...
8 5 task names + 3 more...
N (N≥7) 5 task names + ${N-5} more...

Applied symmetrically in both life-cycle files.

Tests

No existing unit test covers printFlakyTasksMessage()'s formatted output (the surrounding life cycles don't have a *.spec.ts). Adding one would require mocking the task-history daemon channel and life-cycle hooks — out of scope for a small formatting tweak. The change is small enough to verify by inspection of the diff.

Related Issue(s)

(reported internally; no public issue)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@FrozenPandaz
fix(core): show flaky-task count in run summary
91be2a3
When more than one flaky task is detected, the summary header rendered
'Nx detected  flaky tasks' (two spaces, no number) because the plural
branch of the ternary in printFlakyTasksMessage only contained the
literal ' flaky tasks' string with a leading space and no count
interpolation.

Render the count for the plural case while preserving the singular
'Nx detected a flaky task' wording.

Same fix applied to both the current and legacy life-cycle handlers.
@FrozenPandaz
FrozenPandaz requested a review from a team as a code owner April 29, 2026 07:40
@FrozenPandaz
FrozenPandaz requested a review from AgentEnder April 29, 2026 07:40
@netlify

netlify Bot commented Apr 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

✅ Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 341d035
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69f35fb67f6d2e00084f5d68
😎 Deploy Preview https://deploy-preview-35491--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netlify

netlify Bot commented Apr 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

✅ Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 341d035
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69f35fb616ead80008aa204e
😎 Deploy Preview https://deploy-preview-35491--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nx-cloud

nx-cloud Bot commented Apr 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 341d035

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 56m 51s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 17s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 24s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-30 14:57:31 UTC

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@FrozenPandaz
FrozenPandaz enabled auto-merge (squash) April 29, 2026 13:51
AgentEnder
AgentEnder reviewed Apr 29, 2026
View reviewed changes
Comment thread packages/nx/src/tasks-runner/life-cycles/task-history-life-cycle-old.ts Outdated

@AgentEnder AgentEnder Apr 29, 2026

Copy link
Copy Markdown
Member

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.

Should we maybe limit this to the first ~3-5 of them and add a row for "and # more" or similar? The original complaint was stemming from the gradle tasks being detected as flaky and filling up the terminal viewport imho

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@FrozenPandaz FrozenPandaz Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

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.

Done — capped at 5 with a N more... collapse row when there are more than 6 flaky tasks. 341d035

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@FrozenPandaz
fix(core): truncate long flaky-task lists in run summary
341d035
Cap the printed list at 5 entries with a "N more..." collapse row when
there are more than 6 flaky tasks. The title still shows the true total.
AgentEnder
AgentEnder approved these changes Apr 30, 2026
View reviewed changes
@FrozenPandaz
FrozenPandaz merged commit 703e6d9 into master Apr 30, 2026
25 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@FrozenPandaz
FrozenPandaz deleted the fix/flaky-task-count-missing branch April 30, 2026 21:32
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@AgentEnder AgentEnder AgentEnder approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@FrozenPandaz @AgentEnder
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.