Skip to content

SRVKP-9437: fix - resolve pending approval tasks displaying as Unknown#1059

Open
adityavshinde wants to merge 2 commits into
openshift-pipelines:masterfrom
adityavshinde:fix/SRVKP-9437
Open

SRVKP-9437: fix - resolve pending approval tasks displaying as Unknown#1059
adityavshinde wants to merge 2 commits into
openshift-pipelines:masterfrom
adityavshinde:fix/SRVKP-9437

Conversation

@adityavshinde
Copy link
Copy Markdown

@adityavshinde adityavshinde commented May 7, 2026

Summary

In the OpenShift Pipelines Approvals tab, newly created manual approval tasks for a PipelineRun are shown with a status of “Unknown” even though they are pending. Because the Approvals tab filters by "Pending" by default, these tasks do not match the filter criteria and are completely hidden from the user, making the page look empty.

Root Cause

The bug resides in the UI's “getApprovalStatus” function (console-plugin/src/components/utils/pipeline-approval-utils.ts).
The function currently enforces a strict logic gate: it only checks if an approval is "pending" if the associated PipelineRun is currently in a Running state. If the PipelineRun is not running ( i.e. status of the PipelineRun is not yet fetched by the UI ) then the function skips the pending status check entirely.
Instead of evaluating the task's actual state, it hits the bottom of the function and returns an unconditional default fallthrough of ApprovalStatus.Unknown.

Changes

Right before the final fallthrough to Unknown, the function should check if the task's core state is ApproverStatusResponse.Pending and return ApprovalStatus.RequestSent (which renders as "Pending" in the UI).

Screen Recordings

Before fix

MAG-CASE-1.mp4
MAG-CASE-3.mp4
MAG-CASE-4.mp4

After fix combined

MAG-After-fix.mp4

@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

openshift-ci-robot commented May 7, 2026

@adityavshinde: This pull request references SRVKP-9437 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 bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

In the OpenShift Pipelines Approvals tab, newly created manual approval tasks for a PipelineRun are shown with a status of “Unknown” even though they are pending. Because the Approvals tab filters by "Pending" by default, these tasks do not match the filter criteria and are completely hidden from the user, making the page look empty.

Root Cause

The bug resides in the UI's “getApprovalStatus” function (console-plugin/src/components/utils/pipeline-approval-utils.ts).
The function currently enforces a strict logic gate: it only checks if an approval is "pending" if the associated PipelineRun is currently in a Running state. If the PipelineRun is not running ( i.e. status of the PipelineRun is not yet fetched by the UI ) then the function skips the pending status check entirely.
Instead of evaluating the task's actual state, it hits the bottom of the function and returns an unconditional default fallthrough of ApprovalStatus.Unknown.

Changes

Right before the final fallthrough to Unknown, the function should check if the task's core state is ApproverStatusResponse.Pending and return ApprovalStatus.RequestSent (which renders as "Pending" in the UI).

Screen Recordings

MAG-CASE-1.mp4
MAG-CASE-3.mp4
MAG-CASE-4.mp4

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.

@openshift-ci openshift-ci Bot requested review from vdemeester and vikram-raj May 7, 2026 11:00
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: adityavshinde
Once this PR has been reviewed and has the lgtm label, please assign lokanandaprabhu for approval. For more information see the Code Review Process.

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

Details Needs approval from an approver in each of these files:

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

Signed-off-by: Aditya Shinde <adishind@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants