Skip to content

SRVKP-15007: add Dispatch timeline section under Cluster Execution - #1462

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-pipelines:masterfrom
arvindk-softwaredev:feat/SRVKP-15007
Nov 3, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift-pipelines:masterfrom
arvindk-softwaredev:feat/SRVKP-15007

Conversation

@arvindk-softwaredev

@arvindk-softwaredev arvindk-softwaredev commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Migration
  • CVE Fix

Summary

Display the Dispatch timeline of a PLR to visualize the various states under the Cluster Execution card of PLR details page

Detailed AI Summary here

Screen Recordings

SRVKP-15007.mov

@openshift-ci openshift-ci Bot added the approved Label for Approved PRs label Nov 3, 2026
@arvindk-softwaredev arvindk-softwaredev changed the title feat: add Dispatch timeline section under Cluster Execution SRVKP-15007: add Dispatch timeline section under Cluster Execution Nov 3, 2026
@openshift-ci-robot

openshift-ci-robot commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

@arvindk-softwaredev: This pull request references SRVKP-15007 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.1.0" version, but no target version was set.

Details

In response to this:

Display the Dispatch timeline of a PLR to visualize the various states under the Cluster Execution card of PLR details page

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Migration
  • CVE Fix

Summary

Screen Recordings / Screenshot

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@arvindk-softwaredev

Copy link
Copy Markdown
Contributor Author

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Warning

/review is deprecated. Use /agentic_review instead (removal date not yet scheduled).

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Hidden failures

Selecting only an admission check in the Ready state hides rejected or pending checks. Validate that the timeline shows the actual admission-check state, including failures.

const admissionCheck = workload?.status?.admissionChecks?.find(
  (c) => c.state === 'Ready',
);
Incorrect status

The Admission Checks step derives its variant from workloadAdmission, so it can appear successful even when no admission check is ready. Derive the variant from the admission-check state instead.

<ProgressStep
  variant={GetProgressStepVariant(workloadAdmission?.status)}
  icon={
    !workloadsLoaded || !admissionCheck ? (
      <RhUiInProgressIcon />
    ) : undefined
Duplicate ID

Workload completion reuses the workload-admission ID, creating duplicate DOM IDs that can break step targeting and accessibility. Give it a unique ID.

<ProgressStep
  variant={GetProgressStepVariant(workloadCompletion?.status)}
  icon={
    !workloadsLoaded || !workloadCompletion ? (
      <RhUiInProgressIcon />
    ) : undefined
  }
  id="workload-admission"
>

@qodo-code-review

Copy link
Copy Markdown

Important

The /generate_labels command by Qodo was deprecated on the 1st of October 2026 and is no longer available. We recommend switching to the latest Qodo review capabilities. Learn more

@qodo-code-review

qodo-code-review Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Admission checks show the wrong status 🐞 Bug ≡ Correctness
Description
The Admission Checks step passes workloadAdmission?.status to GetProgressStepVariant rather than
deriving its variant from the checks. When admission and check states differ, the step's success or
failure styling can contradict its check label and in-progress icon.
Code

src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[175]

+                    variant={GetProgressStepVariant(workloadAdmission?.status)}
Evidence
The component reads the Admitted condition and admission checks separately, but uses the former
for the third step's variant and the latter for its icon and label.

src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[103-109]
src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[174-194]
src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[57-68]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Admission Checks step takes its visual status from workload admission, so its variant can disagree with its own check label and icon.

## Fix Focus Areas
- src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[174-194]

## Recommended Fix
Calculate the step variant from the aggregate admission-check state, not the `Admitted` condition. Keep the variant, icon, and label driven by the same derived state.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


2. Waiting workloads appear to have failed ✗ Dismissed
Description
GetProgressStepVariant maps every False condition to danger, including quota reservation,
admission, and completion conditions. A workload that is waiting for quota or admission, or is still
running, can therefore show a red failure step even though that stage is not a failure.
Code

src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[R63-64]

+    case 'False':
+      return 'danger';
Evidence
The new helper maps False unconditionally to danger, and all three workload-condition steps pass
their statuses to it. The in-progress icon is supplied only when a condition is absent, so a present
False condition has no waiting-state treatment.

src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[57-68]
src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[138-166]
src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[197-212]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The timeline treats every `False` workload condition as a failed stage, including conditions that are false while work is waiting or running.

## Fix Focus Areas
- src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[57-68]
- src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[138-212]

## Recommended Fix
Derive the visual state from the condition type and reason as well as status, mapping ordinary waiting and running conditions to pending and reserving danger for actual failures. Test waiting, running, and failed workloads.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. One ready check hides other check states ✗ Dismissed
Description
admissionCheck selects only the first entry whose state is Ready instead of evaluating the
workload's complete admissionChecks array. If another check is pending or rejected, the step
presents the checks as ready; if none is ready, it hides their actual states behind an in-progress
icon.
Code

src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[R107-109]

+  const admissionCheck = workload?.status?.admissionChecks?.find(
+    (c) => c.state === 'Ready',
+  );
Evidence
The workload type allows an array of independently stateful admission checks. The new find ignores
every non-ready entry, while the rendered label and icon depend solely on whether that search
returned a ready entry.

src/types/kueue.ts[33-40]
src/types/kueue.ts[57-62]
src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[107-109]
src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[174-195]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Selecting a single ready admission check can mark a group of checks ready while another check is pending or rejected, and conceals states when no check is ready.

## Fix Focus Areas
- src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[107-109]
- src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[174-195]

## Recommended Fix
Derive the stage state from all admission checks: distinguish no configured checks, pending checks, rejected checks, and the case where every required check is ready. Render a corresponding reason or state, and cover mixed-state arrays in tests.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View medium (1)
4. Two timeline stages share one page ID ✗ Dismissed
Description
The workload-completion step reuses id="workload-admission" from the admission step. Both steps
render in the same card, so ID-based lookup or references cannot uniquely identify the completion
stage.
Code

src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[204]

+                    id="workload-admission"
Evidence
The second and fourth steps explicitly declare the same ID within one ProgressStepper.

src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[158-165]
src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[197-205]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The completion and admission steps render with the same DOM ID.

## Fix Focus Areas
- src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[158-165]
- src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx[197-205]

## Recommended Fix
Give the completion step a distinct ID, such as `workload-completion`, and check that every step ID in the rendered timeline is unique.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
❌ Tickets: failed to load — Ticket collection could not establish complete evidence
Review mode: Auto: ⚖️ Balanced: Substantial UI state logic introduces real localized behavioral risk.

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@arvindk-softwaredev

Copy link
Copy Markdown
Contributor Author

/agentic_describe

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add dispatch timeline to PipelineRun Cluster Execution details

✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Show quota reservation, workload admission, admission checks, and completion in a dispatch
 timeline.
• Place the timeline beside existing cluster and queue information, with loading and error states.
Diagram

graph TD
  A["PipelineRun details"] --> B["Cluster Execution"] --> C["Workload watch"] --> D["Dispatch timeline"] --> E["Quota reservation"] --> F["Workload admission"] --> G["Admission checks"] --> H["Workload completion"]
Loading
High-Level Assessment

Using the existing Workload watch and Cluster Execution card is appropriate for this scoped display feature; a separate data source or component would add complexity without a clear benefit. Add focused coverage for step states and workload-load errors before merging.

Files changed (2) +274 / -118

Enhancement (2) +274 / -118
plugin__pipelines-console-plugin.jsonAdd English dispatch timeline strings +6/-0

Add English dispatch timeline strings

• Adds the timeline heading, four stage labels, and workload-load error message.

locales/en/plugin__pipelines-console-plugin.json

MultiClusterExecutionDetails.tsxRender workload dispatch stages in Cluster Execution +268/-118

Render workload dispatch stages in Cluster Execution

• Adds a vertical progress stepper derived from Kueue Workload conditions and a Ready admission check, with status variants, reason labels, and a load-error alert. Reflows the card into responsive timeline, target-cluster, and queue sections while retaining the existing cluster and queue data.

src/components/pipelineRuns-details/MultiClusterExecutionDetails.tsx

Display the Dispatch timeline of a PLR to visualize the various states
under the Cluster Execution card of PLR details page

@anwesha-palit-redhat anwesha-palit-redhat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Looks Good to Me Label label Nov 3, 2026
@openshift-ci

openshift-ci Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anwesha-palit-redhat, arvindk-softwaredev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [anwesha-palit-redhat,arvindk-softwaredev]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit b42d826 into openshift-pipelines:master Nov 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Label for Approved PRs jira/valid-reference lgtm Looks Good to Me Label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants