[CI/CD] Frontend Unit Tests intermittently hang in portlets-content-drive and hold CI for hours
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- github-actions, typescript
Línea de trabajo
Start by repeatedly running the Content Drive suite with the command in the reproduction steps, then use Vitest's hanging-process or verbose reporter to identify the last spec and open handle. The issue points to dot-content-drive-shell.component.spec.ts as prior teardown context but says the current culprit is unknown. Done means identifying and fixing the hang, getting 20 consecutive local runs and a week of CI runs without hangs, and adding a job timeout or Vitest teardown timeout.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem Statement
Since 2026-11-06, the Frontend Unit Tests job intermittently hangs in the Content Drive test suite (portlets-content-drive). The job doesn't fail: it prints nothing more and runs until someone cancels it or the merge queue drops the PR, anywhere from about 15 minutes to almost 4 hours later. A normal run of the job takes about 20 to 25 minutes.
Any PR that changes libs/edit-content is exposed on every run, because Nx tests every project that depends on a changed one, and Content Drive depends on edit-content. One such PR (#38401) was ejected from the merge queue three times by this hang before it merged.
Evidence. Six hung runs across four PRs, all with the same signature:
- The last project to report done is
edit-content(or another unrelated project), and then the step prints nothing until it's cancelled. - In the job's uploaded test-report artifact (
build-reports-test-Frontend Tests),core-web/target/core-web-reports/portlets-content-drive.xmlexists but is 0 bytes. Content Drive's Vitest run started, and its reporter created the file, but it never finished writing results. No other unfinished project produced a report file.
| Run | PR | Workflow | Silent from → until cancelled (UTC) |
|---|---|---|---|
| 42304344200 | #38404 | merge queue | 11-06 22:47 (step start) → 11-07 02:37 |
| 42880697890 | #38401 | merge queue | 11-10 19:24 → 20:20 |
| 42884775455 | #38520 | merge queue | 11-10 19:48 → 20:02 |
| 42894367498 | #38401 | merge queue | 11-10 20:58 → 21:52 |
| 42909252876 | #38401 | merge queue | 11-10 22:13 → 11-11 02:03 |
| 43049294207 (attempt 2) | #38400 | PR checks | 11-11 17:19 (step start) → cancelled after ~76 min |
For comparison, the same job passed in 23 minutes on #38400 (run 41522933372) and in 20 minutes in the merge-queue run that merged #38401 (run 43064866163).
Probable cause (unconfirmed). The first hang is run 42304344200 (#38404) on 2026-11-06, the day after #38458 merged (2026-11-05 23:20 UTC). None of the merge queue's cancelled runs from Nov 4 to 6 before it shows the hang: each was cancelled in "Initial Artifact Build" or in the integration and Postman jobs, never in Frontend Unit Tests. That PR moved Vitest from 4.0.18 to 4.1.12. In the same change, commit 65f21563e1 mocked @dotcms/edit-content in dot-content-drive-shell.component.spec.ts (using vi.importActual) to stop a lazy side-panel import() from failing teardown. Its message says that failure already happened about one run in two under 4.0.18 ("Closing rpc while fetch was pending"), and that Vitest 4.1 reports it as EnvironmentTeardownError. One possibility is that a similar pending import or open handle elsewhere in the suite now keeps the worker alive instead of erroring. The exact spec file and handle haven't been identified.
Two things make the hang expensive and hard to see:
- The Frontend Unit Tests job has no timeout, so a hang lasts until something outside cancels it.
- Nx runs projects in parallel (
parallel: 3) and prints each project's output only when it finishes. A hung project therefore leaves no output in the log, and only the empty report file points at it.
Steps to Reproduce
- On
main(Vitest 4.1.12), run the Content Drive suite repeatedly:
cd core-web && for i in $(seq 1 20); do pnpm nx test portlets-content-drive --skip-nx-cache || break; done - Watch for a run that stops producing output and never exits. Running Vitest directly with
--reporter=hanging-process(or--reporter=verbose) should name the open handle or the last spec file. - In CI: open a PR that changes any file under
core-web/libs/edit-content. About one run in three or four hangs in Frontend Unit Tests; check the run's artifact for an emptyportlets-content-drive.xml.
Not yet reproduced locally. All evidence so far comes from CI.
Acceptance Criteria
- The spec file and open handle that keep the Content Drive Vitest run alive are identified.
- The Content Drive suite exits reliably: no hang in 20 consecutive local runs, and none in CI over a week of normal PR traffic.
- The Frontend Unit Tests job has a
timeout-minutes(or VitestteardownTimeout), so any future hang fails within minutes instead of holding a runner or merge-queue slot for hours. - Optional: Nx streams each project's output in CI, so the hung project is visible in the log.
dotCMS Version
main as of 2026-11-11 (core-web on Vitest 4.1.12, since #38458)
Severity
Medium - Some functionality impacted
(CI only, no product impact. It repeatedly ejects PRs that change edit-content from the merge queue and ties up runners for hours. A retry usually passes.)
Links
- NA (no Freshdesk ticket)
- Vitest upgrade: #38458 (issue #38455), commit 65f21563e1
- PRs affected: #38401, #38400, #38404, #38520
- Found while landing #37996
🤖 Generated with Claude Code
- Lenguaje dominante
- Java
- Estrellas
- 972
- Forks
- 493
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 228
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotCMS/core
-
dotCMS : UVE OKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
OKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Opening content from Content Search replaces the "Search" breadcrumb in the new Edit Content screenAbiertodotCMS: New Edit Contentlet OKR : Customer Support Team : Falcon Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Escape the Binary field hint in the legacy content editor so an apostrophe doesn't break the fieldAbiertoOKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 2 días
-
dotCMS : Permissions OKR : Customer Support Team : Maintenance Type : Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
Todos los issues de dotCMS/core
Issues similares
-
desktop grp:about type:graphics-bug ui-public
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
it-at-m/Wahllokalsystem#3846 ·
Los mantenedores suelen responder en 2 días
-
Area/Connector module/solace Priority/Low Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
ballerina-platform/ballerina-library#9849 ·
Los mantenedores suelen responder en 1 día