[
https://issues.apache.org/jira/browse/FLINK-40601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Purushottam Sinha updated FLINK-40601:
--------------------------------------
Description:
FLINK-40117 and FLINK-40600 added Vitest specs for the highest-traffic web
dashboard views, but the bulk of the dashboard's controller logic was still
untested (at the start, 67 of 102 testable source files had zero spec
coverage). This ticket adds specs for the remaining views and services that
carry real logic.
Delivered in [PR#29138|https://github.com/apache/flink/pull/29138] (29 new spec
files):
* Core services: {{config}}, {{overview}}, {{status}}, {{job-manager}}, and
{{job}} (task-state normalization, plan/stream-graph conversion, accumulator
merge, desired-parallelism update, refresh stream).
* The job-detail drawer tree under {{pages/job/overview/*}}: accumulators,
backpressure, chart, detail, flamegraph, subtasks, taskmanagers, watermarks.
* JobManager pages: log, stdout, thread-dump, profiler.
* TaskManager pages: stdout, thread-dump, profiler (the siblings of the
JobManager pages; {{logs}}/{{metrics}}/{{list}} already had specs from
FLINK-40117).
* Local stores: the {{job-local}} and {{application-local}} services
(latest-detail replay and the paired job-with-vertex stream).
* Page shells: the job/application list shells and the job/application detail
shells.
* The metric chart card and its resize service, and the job submission page.
Components that fetch through services in {{ngOnInit}} or embed
chart/graph/editor children are constructed directly and driven through their
lifecycle/methods, so the controller logic is exercised without rendering
children jsdom cannot draw.
Deliberately out of scope: {{dagre.component.ts}} and
{{flame-graph.component.ts}} are pure g6/d3 rendering with no controller logic
that can be meaningfully asserted without a real DOM, and the presentational
long tail (badges, thin directives, status/addon sub-components) is not worth
per-component specs. These are intentional skips, not remaining work.
Verification: {{npx ng test --watch=false}} in
{{flink-runtime-web/web-dashboard}} runs 62 spec files / 248 tests (up from
33/139 on master); {{npm run lint}} and prettier are clean.
was:
FLINK-40117 and FLINK-40600 added Vitest specs for the highest-traffic web
dashboard views, but 67 of 102 testable source files
(components/services/pipes/directives/guards) still have zero spec coverage,
leaving core state and the job-inspection UI unverified against regressions.
Gaps:
* No specs for core services: {{job.service.ts}}, {{status.service.ts}},
{{overview.service.ts}}, {{job-manager.service.ts}}, {{config.service.ts}}.
* The entire job-detail drawer tree is untested: accumulators, backpressure,
chart, detail, flamegraph, subtasks, taskmanagers, watermarks (8 files) under
{{pages/job/overview/*}}.
* {{dagre.component.ts}} (job graph),
{{job-chart.component.ts}}/{{.service.ts}}, {{flame-graph.component.ts}}, and
{{submit.component.ts}} (job submission) have none.
* Asymmetric coverage: {{task-manager}} logs/stdout/thread-dump/profiler pages
have specs, the equivalent {{job-manager}} pages do not.
* Top-level shells ({{job-detail}}, {{application-detail}}, {{job.component}},
{{application.component}}) are untested.
We should add specs for the five core services first, then the job-detail
drawer tree following the FLINK-40600 pattern, then mirror the {{task-manager}}
logs/stdout/thread-dump/profiler specs onto {{job-manager}}.
> Web dashboard: finish Vitest coverage for core services and job-detail drawer
> -----------------------------------------------------------------------------
>
> Key: FLINK-40601
> URL: https://issues.apache.org/jira/browse/FLINK-40601
> Project: Flink
> Issue Type: Technical Debt
> Components: Runtime / Web Frontend
> Reporter: Purushottam Sinha
> Priority: Minor
> Labels: pull-request-available
>
> FLINK-40117 and FLINK-40600 added Vitest specs for the highest-traffic web
> dashboard views, but the bulk of the dashboard's controller logic was still
> untested (at the start, 67 of 102 testable source files had zero spec
> coverage). This ticket adds specs for the remaining views and services that
> carry real logic.
> Delivered in [PR#29138|https://github.com/apache/flink/pull/29138] (29 new
> spec files):
> * Core services: {{config}}, {{overview}}, {{status}}, {{job-manager}}, and
> {{job}} (task-state normalization, plan/stream-graph conversion, accumulator
> merge, desired-parallelism update, refresh stream).
> * The job-detail drawer tree under {{pages/job/overview/*}}: accumulators,
> backpressure, chart, detail, flamegraph, subtasks, taskmanagers, watermarks.
> * JobManager pages: log, stdout, thread-dump, profiler.
> * TaskManager pages: stdout, thread-dump, profiler (the siblings of the
> JobManager pages; {{logs}}/{{metrics}}/{{list}} already had specs from
> FLINK-40117).
> * Local stores: the {{job-local}} and {{application-local}} services
> (latest-detail replay and the paired job-with-vertex stream).
> * Page shells: the job/application list shells and the job/application detail
> shells.
> * The metric chart card and its resize service, and the job submission page.
> Components that fetch through services in {{ngOnInit}} or embed
> chart/graph/editor children are constructed directly and driven through their
> lifecycle/methods, so the controller logic is exercised without rendering
> children jsdom cannot draw.
> Deliberately out of scope: {{dagre.component.ts}} and
> {{flame-graph.component.ts}} are pure g6/d3 rendering with no controller
> logic that can be meaningfully asserted without a real DOM, and the
> presentational long tail (badges, thin directives, status/addon
> sub-components) is not worth per-component specs. These are intentional
> skips, not remaining work.
> Verification: {{npx ng test --watch=false}} in
> {{flink-runtime-web/web-dashboard}} runs 62 spec files / 248 tests (up from
> 33/139 on master); {{npm run lint}} and prettier are clean.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)