Skip to content

SRVKP-12917: Clear all filters should clear datasource instead of resetting to default - #1189

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-pipelines:masterfrom
ankrsinha:fix/SRVKP-12917
Jul 27, 2026
Merged

SRVKP-12917: Clear all filters should clear datasource instead of resetting to default#1189
openshift-merge-bot[bot] merged 1 commit into
openshift-pipelines:masterfrom
ankrsinha:fix/SRVKP-12917

Conversation

@ankrsinha

Copy link
Copy Markdown
Contributor

Type of Change

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

Summary

"Clear all filters" on PipelineRuns and TaskRuns pages was not fully clearing the datasource filter. Instead of removing it, it was resetting to the default value ("Cluster"), leaving the filter chip visible and data still filtered by cluster source.

Problem

  • onClearAll called resetDatasourcePreference() which set the preference to ['cluster-data'] (default) instead of [] (no filter).
  • After clearing and navigating away, returning to the page caused a brief flash of "1 filter applied" because the preference fallback returned ['cluster-data'] while the ConfigMap value was still loading.

Fix

  • Added clearPreference method that sets the datasource preference to [], removing the filter entirely.
  • Removed unused resetPreference method.
  • Updated onClearAll to use clearPreference instead of resetPreference.
  • Deferred the default fallback (['cluster-data']) until the preference has finished loading, preventing the flash on navigation.

Screen Recordings / Screenshot

Screencast.From.2026-07-23.11-21-38.mp4

@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 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@ankrsinha ankrsinha changed the title fix: clear all filters should clear datasource instead of resetting to default SRVKP-12917: Clear all filters should clear datasource instead of resetting to default Jul 23, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

@ankrsinha: This pull request references SRVKP-12917 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:

Type of Change

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

Summary

"Clear all filters" on PipelineRuns and TaskRuns pages was not fully clearing the datasource filter. Instead of removing it, it was resetting to the default value ("Cluster"), leaving the filter chip visible and data still filtered by cluster source.

Problem

  • onClearAll called resetDatasourcePreference() which set the preference to ['cluster-data'] (default) instead of [] (no filter).
  • After clearing and navigating away, returning to the page caused a brief flash of "1 filter applied" because the preference fallback returned ['cluster-data'] while the ConfigMap value was still loading.

Fix

  • Added clearPreference method that sets the datasource preference to [], removing the filter entirely.
  • Removed unused resetPreference method.
  • Updated onClearAll to use clearPreference instead of resetPreference.
  • Deferred the default fallback (['cluster-data']) until the preference has finished loading, preventing the flash on navigation.

Screen Recordings / Screenshot

Screencast.From.2026-07-23.11-21-38.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.

@anwesha-palit-redhat
anwesha-palit-redhat requested review from adityavshinde and removed request for anwesha-palit-redhat July 23, 2026 09:13
@adityavshinde

adityavshinde commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

I have verified the changes, everything looks good to me.

Screencast.From.2026-07-23.15-33-30.mp4

add official /lgtm please

@anwesha-palit-redhat
anwesha-palit-redhat self-requested a review July 23, 2026 10:16
@openshift-ci openshift-ci Bot added the lgtm Looks Good to Me Label label Jul 24, 2026

@adityavshinde adityavshinde 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

…o default

Signed-off-by: Ankur Sinha <anksinha@redhat.com>
@openshift-ci openshift-ci Bot removed the lgtm Looks Good to Me Label label Jul 27, 2026
@anwesha-palit-redhat
anwesha-palit-redhat removed their request for review July 27, 2026 06:59
@arvindk-softwaredev

Copy link
Copy Markdown
Contributor

verified using PR image in Openshift cluster

pr.review.mov

@arvindk-softwaredev arvindk-softwaredev 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 Jul 27, 2026
@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adityavshinde, ankrsinha, 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 [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-ci openshift-ci Bot added the approved Label for Approved PRs label Jul 27, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 121bed6 into openshift-pipelines:master Jul 27, 2026
6 checks passed
@ankrsinha

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-v1.24.x

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@ankrsinha: new pull request created: #1215

Details

In response to this:

/cherry-pick release-v1.24.x

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 kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants