Establish a reproducible dependency and test baseline #21

Closed
opened 2026-11-07 21:51:00 +00:00 by martin · 1 comment
Owner

Goal

Resolve the dependency and validation uncertainty recorded in TODO.md before expanding the platform.

Context

The workspace uses Backstage 1.55 and Yarn 4.13. TODO.md records peer warnings, a test run that exceeded five minutes without results, and unverified catalog contents. Establish a baseline before the planned Bun migration; this issue does not require accepting every Renovate upgrade.

Acceptance criteria

  • Investigate Yarn peer warnings and resolve actionable conflicts; document justified exceptions.
  • Complete the test suite and fix failures or hangs with useful diagnostics.
  • Record successful immutable install, typecheck, lint, formatting, and backend-build commands using supported Node.
  • Define a Backstage-compatible upgrade approach and triage existing Renovate PRs via #8, prioritizing security fixes.
  • Reconcile the completed TODO items without editing generated catalog entities.

Phase

1 — Trustworthy foundation

Validated in commit 5250f5b and fc5159a; results are recorded in the progress comment and README.md#validation. Renovate classification is on #8.

## Goal Resolve the dependency and validation uncertainty recorded in `TODO.md` before expanding the platform. ## Context The workspace uses Backstage 1.55 and Yarn 4.13. TODO.md records peer warnings, a test run that exceeded five minutes without results, and unverified catalog contents. Establish a baseline before the planned Bun migration; this issue does not require accepting every Renovate upgrade. ## Acceptance criteria - [x] Investigate Yarn peer warnings and resolve actionable conflicts; document justified exceptions. - [x] Complete the test suite and fix failures or hangs with useful diagnostics. - [x] Record successful immutable install, typecheck, lint, formatting, and backend-build commands using supported Node. - [x] Define a Backstage-compatible upgrade approach and triage existing Renovate PRs via #8, prioritizing security fixes. - [x] Reconcile the completed TODO items without editing generated catalog entities. ## Phase 1 — Trustworthy foundation _Validated in commit `5250f5b` and `fc5159a`; results are recorded in the progress comment and `README.md#validation`. Renovate classification is on #8._
Author
Owner

Progress: dependency and test baseline validated

Commit 5250f5b (chore: establish reproducible test and validation baseline) covers the baseline part of this issue.

Root cause of the "test hang"

@backstage/cli-module-test-jest appends --watch when CI is unset and no --watch/--watchAll/--coverage flag is passed (node_modules/@backstage/cli-module-test-jest/dist/commands/repo/test.cjs.js:124). yarn test therefore enters Jest watch mode and never exits; the earlier "exceeded five minutes without results" was not a failing or slow suite.

yarn test:ci now passes --watchAll=false; CI=true yarn test behaves the same. The suite finishes in about 46 s cold / 27 s warm with 1 suite and 1 test passing.

Peer-dependency triage

Resolved:

  • @testing-library/dom 9 -> 10 and @testing-library/react 14 -> 16 in packages/app, matching @backstage/frontend-test-utils request ranges (^10.0.0, ^16.0.0); the app render test still passes with them.
  • Declared @types/react in packages/app: it was requested by @backstage/core-components but no workspace provided it.
  • Declared jest ~30.2.0 in packages/app and packages/backend (@backstage/cli peer on Jest). Pinned to the root version: using ^30.0.0 pulled a second Jest 30.5.2 into the lockfile.

Accepted and documented in README.md#validation:

  • react, react-dom, and @types/react 18 versus @material-ui/core's ^16.8.6 || ^17.0.0 peer. Backstage 1.55 still depends on Material UI v4 through @backstage/core-components and itself requires React 18, so both ranges cannot be satisfied. Replacing @material-ui/* with @mui/* would break the workspace (application code imports makeStyles and icons from @material-ui/*).
  • Remaining @backstage/cli* peer notes are internal to upstream packages and not actionable here.
  • got stays pinned to 11.8.5 via resolutions for the security advisory already applied in #6.

yarn install --immutable now reports only the Material UI peer mismatch.

Validated command set

Node 22.23.3, Yarn 4.13.0, run to completion on this commit:

Command Result
yarn install --immutable pass (warnings as above)
yarn tsc pass, no output
yarn lint:all pass, 1 file backend / 12 files app
yarn prettier:check pass
yarn test:ci --runInBand pass, 1 suite / 1 test, exit 0
yarn build:backend pass, frontend and backend bundles written

These commands and the watch-mode note are recorded in the README "Validation" section. TODO.md is reconciled: the two resolved items are replaced by a pointer to the README and the remaining catalog check, which stays in #23. No generated catalog entities were touched.

Remaining on this issue

  • Renovate triage is posted on #8 with per-PR recommendations. Acting on it (closing obsolete PRs, rebasing #12) needs maintainer action; see that issue for the classification.
  • Untouched by design: .woodpecker.yaml (#22) and the Bun migration (#20), which depend on this baseline.

Acceptance criteria status: peer warnings investigated and documented, suite completes with diagnostics, commands recorded, TODO reconciled. The upgrade approach is documented in README and triaged on #8; merging or closing the identified PRs is the remaining follow-up.

## Progress: dependency and test baseline validated Commit `5250f5b` (`chore: establish reproducible test and validation baseline`) covers the baseline part of this issue. ### Root cause of the "test hang" `@backstage/cli-module-test-jest` appends `--watch` when `CI` is unset and no `--watch`/`--watchAll`/`--coverage` flag is passed (`node_modules/@backstage/cli-module-test-jest/dist/commands/repo/test.cjs.js:124`). `yarn test` therefore enters Jest watch mode and never exits; the earlier "exceeded five minutes without results" was not a failing or slow suite. `yarn test:ci` now passes `--watchAll=false`; `CI=true yarn test` behaves the same. The suite finishes in about 46 s cold / 27 s warm with 1 suite and 1 test passing. ### Peer-dependency triage Resolved: - `@testing-library/dom` 9 -> 10 and `@testing-library/react` 14 -> 16 in `packages/app`, matching `@backstage/frontend-test-utils` request ranges (`^10.0.0`, `^16.0.0`); the app render test still passes with them. - Declared `@types/react` in `packages/app`: it was requested by `@backstage/core-components` but no workspace provided it. - Declared `jest ~30.2.0` in `packages/app` and `packages/backend` (`@backstage/cli` peer on Jest). Pinned to the root version: using `^30.0.0` pulled a second Jest 30.5.2 into the lockfile. Accepted and documented in `README.md#validation`: - `react`, `react-dom`, and `@types/react` 18 versus `@material-ui/core`'s `^16.8.6 || ^17.0.0` peer. Backstage 1.55 still depends on Material UI v4 through `@backstage/core-components` and itself requires React 18, so both ranges cannot be satisfied. Replacing `@material-ui/*` with `@mui/*` would break the workspace (application code imports `makeStyles` and icons from `@material-ui/*`). - Remaining `@backstage/cli*` peer notes are internal to upstream packages and not actionable here. - `got` stays pinned to `11.8.5` via `resolutions` for the security advisory already applied in #6. `yarn install --immutable` now reports only the Material UI peer mismatch. ### Validated command set Node 22.23.3, Yarn 4.13.0, run to completion on this commit: | Command | Result | | --- | --- | | `yarn install --immutable` | pass (warnings as above) | | `yarn tsc` | pass, no output | | `yarn lint:all` | pass, 1 file backend / 12 files app | | `yarn prettier:check` | pass | | `yarn test:ci --runInBand` | pass, 1 suite / 1 test, exit 0 | | `yarn build:backend` | pass, frontend and backend bundles written | These commands and the watch-mode note are recorded in the README "Validation" section. `TODO.md` is reconciled: the two resolved items are replaced by a pointer to the README and the remaining catalog check, which stays in #23. No generated catalog entities were touched. ### Remaining on this issue - Renovate triage is posted on #8 with per-PR recommendations. Acting on it (closing obsolete PRs, rebasing #12) needs maintainer action; see that issue for the classification. - Untouched by design: `.woodpecker.yaml` (#22) and the Bun migration (#20), which depend on this baseline. Acceptance criteria status: peer warnings investigated and documented, suite completes with diagnostics, commands recorded, TODO reconciled. The upgrade approach is documented in README and triaged on #8; merging or closing the identified PRs is the remaining follow-up.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Personal/backstage#21
No description provided.