Skip to content

fix(web): handle empty job run history - #3117

Open
Hanabi9248 wants to merge 2 commits into
MarquezProject:mainfrom
Hanabi9248:codex/empty-job-run-history
Open

fix(web): handle empty job run history#3117
Hanabi9248 wants to merge 2 commits into
MarquezProject:mainfrom
Hanabi9248:codex/empty-job-run-history

Conversation

@Hanabi9248

Copy link
Copy Markdown

Problem

Closes #3115.

JobRunItem throws when latestRuns is empty because its reduction has no initial value. A history containing only zero-duration runs also produces NaN bar heights.

Solution

Reduce to the maximum duration starting at zero, and use zero height when there is no positive duration. The existing minimum bar height still applies. Normal histories keep their relative bar heights and display order.

Added component tests for empty histories, one run, zero-duration runs, and mixed durations, including preservation of the input order. The empty and zero-duration cases fail on the original component.

Validation

  • Full web Jest suite: 23 passed, 6 existing skipped tests.
  • tsc --noEmit, scoped ESLint, and test formatting checks passed.
  • Production webpack build: the same two unresolved react-router errors on both this branch and unchanged main (180f37b). Tested with Node 24, npm ci --legacy-peer-deps; Jest used NODE_PATH=node_modules/jest/node_modules to resolve the installed jest-util peer.

One-line summary: Fix dashboard rendering for jobs with empty or zero-duration run histories.

Checklist

  • Changes signed off
  • Regression tests included
  • Small, self-contained diff
  • Source license header included
  • Documentation and database migrations: not applicable

Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
@boring-cyborg

boring-cyborg Bot commented Sep 12, 2026

Copy link
Copy Markdown

Thanks for opening your first pull request in the Marquez project! Please check out our contributing guidelines (https://github.com/MarquezProject/marquez/blob/main/CONTRIBUTING.md).

@boring-cyborg boring-cyborg Bot added the web label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marquez UI fails to render when job.latestRuns is empty

1 participant