Skip to content

[release/17.0] Read resource row state at every density in dashboard browser tests - #22024

Closed
Mitch Denny (mitchdenny) wants to merge 1 commit into
mitchdenny-backport-17-0-26-pr21920from
mitchdenny-backport-17-0-27-pr21924
Closed

Mitch Denny (mitchdenny) wants to merge 1 commit into
mitchdenny-backport-17-0-26-pr21920from
mitchdenny-backport-17-0-27-pr21924

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

Backport of #21924 to release/17.0 (cherry-picked from 01d9682 with no modifications). Layer 27 of 55 in the release/17.0 backport stack; stacked on #22023.

Backport recommendation: Yes — Test fix required by #21880.

Backport of #21924

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

…21924)

## Description

The scheduled [Outerloop Tests run on
main](https://github.com/microsoft/aspire/actions/runs/42437120205)
failed in two jobs after #21880:

- [Templates
(ubuntu-latest)](https://github.com/microsoft/aspire/actions/runs/42437120205/job/128616874013):
all 10 `StarterTemplateWithRedisCacheTests` and
`StarterTemplateWithRedisCacheTests_Net11` tests timed out waiting for
`.resource-row-sub > .state-dot + span` in
`DashboardResourceAssertions.CheckResourcesAsync`.
- [Hosting.Testing
(ubuntu-latest)](https://github.com/microsoft/aspire/actions/runs/42437120205/job/128616874062):
`DashboardUrlTests.DashboardDisplaysResourceUpdatesWhileAppHostIsPausedAtBreakpoint`
couldn't find the text "Dashboard test initial" in the resource row. The
row itself was there.

## Failure stats (14d, attempt 1)

`Outerloop Tests` workflow on microsoft/aspire, runs created 2026-10-25
06:28 → 2026-11-08 06:28 UTC, **attempt 1 only**. Denominator: attempt-1
jobs that ran (success or failure). Hits: the failed job's log matches
the signature. Jobs that lost their runner, which have no log, are
excluded.

| | |
|---|---|
| Signature | Templates: `.resource-row-sub > .state-dot + span`
timeout; Hosting.Testing: `Dashboard test initial` not found |
| Job | Outerloop Tests: Templates (ubuntu-latest) and Hosting.Testing
(ubuntu-latest), main |
| main pushes: hits / runs | 2 / 28 (7.14%) |
| main scheduled runs, 30d: hits / jobs | 2 / 60 (3.33%), both on
2026-11-08. Templates also failed on main every scheduled run from
2026-10-10 to 2026-11-04 with other causes |
| PR runs: hits / runs | n/a (Outerloop PR runs don't run these jobs) |
| Combined rate | 2 / 28 = **7.14%** |
| Flake check | main: failed on all 4 attempts of the run (not a flake)
|
| First / last hit | 2026-11-08 / 2026-11-08 |
| Still hitting main? | Hit on the latest scheduled main run
(2026-11-08); no main run since |
| Fix evidence | Local: default-density helper tests fail with the old
helper and pass with the new one. Outerloop dispatched on this PR's
head: Templates and Hosting.Testing (ubuntu) passed 2/2 attempts. |

Failing attempt-1 jobs, most recent first (2 of 2 log-verified hits):

| Date (UTC) | Branch | Job | Signature excerpt |
|---|---|---|---|
| [2026-11-08
02:06](https://github.com/microsoft/aspire/actions/runs/42437120205/job/128604467928)
| **main** | Hosting.Testing (ubuntu-latest) | `GetByText("Dashboard
test initial", Exact) element(s) not found` |
| [2026-11-08
02:06](https://github.com/microsoft/aspire/actions/runs/42437120205/job/128604468061)
| **main** | Templates (ubuntu-latest) | `.resource-row-sub > .state-dot
+ span timeout` |

**Verdict: STRONG (real break, not a flake).** The 2026-11-08 scheduled
main run failed both jobs on **all 4 attempts** with these signatures.
The prior scheduled runs (2026-11-06 and 2026-11-07) passed, and the
signature never appeared earlier in the window. Earlier Templates
failures (2026-10-27 to 2026-11-04) had other causes.

<!-- /failure-stats -->

**Why:** #21880 deliberately brought back single-line rows for
**Compact**, the dashboard's default density. A compact row shows the
state as a dot in a `.resource-row-meta-state` column, and the state's
name is in that column's `data-tooltip`. There's no `.resource-row-sub`
and no visible state text. These browser tests open the dashboard at its
default density, so they no longer found the state.
`Aspire.Dashboard.Playwright.Tests` passed because `PlaywrightTestsBase`
pins those tests to Comfortable unless they opt into the default. This
is a deterministic break, not a flake: the previous scheduled runs on
main
([42327544779](https://github.com/microsoft/aspire/actions/runs/42327544779),
before #21880) passed, and the only dashboard change in between is
#21880.

**Fix:** the tests now match the intended markup, and no assertions are
dropped:

- `DashboardResourceAssertions.GetRowStateAsync` reads a row's state at
any density. In compact rows it reads the state column's tooltip. In
other densities it reads the text after the dot. `RowState(row, state)`
finds the element that shows a given state.
- `CheckResourcesAsync` uses `GetRowStateAsync`, and keeps waiting while
a row hasn't rendered a state yet.
- `DashboardDisplaysResourceUpdatesWhileAppHostIsPausedAtBreakpoint`
waits for the initial and then the updated state with `RowState`.
-
`TemplateResourceAssertionsTests.TemplateHelper_ValidatesSidebarAndDetailsWithoutCards`
now runs at both the default (compact) density and Comfortable, and
checks `RowState` directly, so the helper is covered against the real
dashboard at the density the template tests use.

## Confidence

- Locally, the 6 `TemplateResourceAssertionsTests` pass. With the old
helper, the two new default-density cases fail with the same `Timeout
... exceeded` as the Templates job.
- [Outerloop Tests dispatched on this
branch](https://github.com/microsoft/aspire/actions/runs/42450827141) to
cover the Templates and Hosting.Testing jobs end to end. I didn't run
those two locally; they need the full template build and container
runtime.

**How we stop this recurring:** the shared helper's own test now runs at
the dashboard's default density, so a markup change to default rows
fails that test against the dashboard alone, which is fast to run
locally while changing row markup and points straight at the helper.
It's still an outerloop test, so it doesn't gate PR CI.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

**🤖 Posted by AspireAgent (AI Agent)**

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 01d9682)
@github-actions

This comment has been minimized.

@mitchdenny

Copy link
Copy Markdown
Member Author

Approved for inclusion in release/17.0. Do not merge yet.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22024

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22024"

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

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