Skip to content

[FLINK-40600][runtime-web] Add missing web dashboard specs and tighten thin ones - #29135

Open
spuru9 wants to merge 1 commit into
apache:masterfrom
spuru9:FLINK-40600
Open

[FLINK-40600][runtime-web] Add missing web dashboard specs and tighten thin ones#29135
spuru9 wants to merge 1 commit into
apache:masterfrom
spuru9:FLINK-40600

Conversation

@spuru9

@spuru9 spuru9 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

FLINK-40117 added Vitest specs for most of the web dashboard views, but pages/application/overview and pages/application/exceptions still had none. Some of the added specs also only checked that the mocked data was loaded, not what the component derived from it: the timeline spec didn't assert the computed vertex and subtask ranges, the job overview spec never fed a plan into ngOnInit, the cluster overview spec didn't assert the derived statistics, and TaskManagerService only had tests for loadManagers and loadManager. The HumanizeDatePipe test for format 'B' relied on Angular throwing for missing locale data, which an Angular upgrade could change.

This adds the two missing specs and tightens the existing ones so they fail when the derived values change.

Brief change log

  • Added application-overview.component.spec.ts and application-exceptions.component.spec.ts.
  • Tightened job-timeline.component.spec.ts to assert the computed vertex ranges (including the duration-derived end-time branch and filtering of not-yet-started vertices) and the per-subtask timeline ranges, instead of just checking counts/names.
  • Tightened job-overview.component.spec.ts with a new spec that feeds an actual plan into ngOnInit and asserts the derived pendingNodes/pendingLinks and the resulting dagreComponent.flush call.
  • Tightened overview.component.spec.ts (cluster overview) to assert the exact derived cluster-statistics object instead of just checking for static label text.
  • Expanded task-manager.service.spec.ts from covering only loadManagers/loadManager to covering all public methods.
  • Replaced the humanize-date.pipe.spec.ts test that relied on Angular throwing for format 'B' with one driven by an unregistered locale, which is a stable part of Angular's i18n contract rather than a version-dependent implementation detail.

Verifying this change

This change added tests and can be verified as follows:

  • npx ng test --watch=false in flink-runtime-web/web-dashboard: 35 spec files / 158 tests pass (up from the prior baseline of 33 files / 139 tests).
  • npm run lint and npx prettier --check are clean on all changed/added files.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code (claude-sonnet-5)

@flinkbot

flinkbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@spuru9
spuru9 marked this pull request as draft September 8, 2026 18:44
@spuru9
spuru9 force-pushed the FLINK-40600 branch 3 times, most recently from efdc60b to 8229b6b Compare September 8, 2026 19:04
…n thin ones

FLINK-40117 added Vitest specs for most web dashboard views, but
pages/application/overview and pages/application/exceptions still had
none, and several existing specs only checked that mocked data was
loaded rather than what the component derived from it.

Adds the two missing specs, and tightens the timeline, job overview,
and cluster overview specs to assert their computed values, expands
TaskManagerService coverage beyond loadManagers/loadManager, and
replaces the HumanizeDatePipe format-'B' test's reliance on an
Angular-internal throw with one driven by an unregistered locale.

Generated-by: Claude Code (claude-sonnet-5)
@spuru9
spuru9 marked this pull request as ready for review September 8, 2026 19:10
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