Skip to content

fix(pipeline-augment): scope PipelineRun match to Pipeline namespace - #1170

Merged
anwesha-palit-redhat merged 1 commit into
openshift-pipelines:masterfrom
seiya-koji:fix/pipeline-list-latestrun-namespace
Jul 15, 2026
Merged

fix(pipeline-augment): scope PipelineRun match to Pipeline namespace#1170
anwesha-palit-redhat merged 1 commit into
openshift-pipelines:masterfrom
seiya-koji:fix/pipeline-list-latestrun-namespace

Conversation

@seiya-koji

@seiya-koji seiya-koji commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Type of Change

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

Summary

augmentRunsToData() matched PipelineRuns to Pipelines using only the tekton.dev/pipeline label, without checking that the PipelineRun's namespace matches the Pipeline's namespace.
In the Pipelines list "All Projects" view, this caused every Pipeline with the same name across different namespaces to show the same "Last run", even when the PipelineRun only existed in one of those namespaces.

Fixes #1168

Fix: added a namespace equality check to the existing label match in augmentRunsToData.

Test plan:

  • Added a regression test in pipeline-augment.spec.ts reproducing the bug: two Pipelines with the same name in different namespaces, only one of which has a matching PipelineRun. Confirmed it fails before the fix and passes after.
  • Adjusted pre-existing test fixtures (pipeline-augment-test-data.ts) that had Pipeline/PipelineRun namespace mismatches, so they keep passing under the new namespace-aware matching.
  • Ran the full test suite: all passing (1 pre-existing skip, unrelated to this change).
  • eslint on changed files: no issues.

Screen Recordings / Screenshot

Before

Screen recordings for before/after.

Before: When a create-table Pipeline was run in only one namespace, every namespace that had a Pipeline with the same name showed that run — the create-table-ixlmy2 PipelineRun appeared across all of them, all with the same timestamp (Jul 10, 2026, 3:23 PM).

image

After this fix, only the namespace where the Pipeline actually ran shows a result — each namespace now shows its own PipelineRun.

image

augmentRunsToData() matched PipelineRuns to Pipelines by the
tekton.dev/pipeline label only, ignoring namespace. In the "All
Projects" list view this caused every same-named Pipeline across
namespaces to show the same "Last run", even when the PipelineRun
only existed in one namespace.

Fixes openshift-pipelines#1168
@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Hi @seiya-koji. Thanks for your PR.

I'm waiting for a openshift-pipelines member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@anwesha-palit-redhat

Copy link
Copy Markdown
Contributor

Hi @seiya-koji 👋
Can you please add before / after screen recordings if possible ?

@anwesha-palit-redhat

Copy link
Copy Markdown
Contributor

/ok-to-test

@seiya-koji

Copy link
Copy Markdown
Contributor Author

@anwesha-palit-redhat
Added before/after screenshots to the PR description.

@seiya-koji

Copy link
Copy Markdown
Contributor Author

FYI — this looks like an openshift/release-side issue, but flagging it here.

While testing this locally, yarn run start-console failed with useSearchParams/useNavigate is not a function.
It looks like quay.io/openshift/origin-console:latest is stuck on a 2026-02-14 build (pre-dates react-router v7).

The mirroring job that's supposed to update it has been failing on every run: https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/periodic-image-mirroring-openshift

@anwesha-palit-redhat

Copy link
Copy Markdown
Contributor

Defect verification

Defect-verification.mov

Fix verification

Fix-verification.mov

@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 lgtm Looks Good to Me Label approved Label for Approved PRs labels Jul 14, 2026
@anwesha-palit-redhat

Copy link
Copy Markdown
Contributor

@seiya-koji would you please mind cherry-picking this to main ?

@anwesha-palit-redhat

Copy link
Copy Markdown
Contributor

/cherry-pick main

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@anwesha-palit-redhat: once the present PR merges, I will cherry-pick it on top of main in a new PR and assign it to you.

Details

In response to this:

/cherry-pick main

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.

@seiya-koji

Copy link
Copy Markdown
Contributor Author

@anwesha-palit-redhat I'm not too familiar with how this works — does this mean the bot will handle the cherry-pick automatically once this merges, and there's nothing I need to do on my end?
Or would it be better if I opened the PR against main myself?

@anwesha-palit-redhat

Copy link
Copy Markdown
Contributor

@anwesha-palit-redhat I'm not too familiar with how this works — does this mean the bot will handle the cherry-pick automatically once this merges, and there's nothing I need to do on my end? Or would it be better if I opened the PR against main myself?

my bad, i did not explain it well, we will let this PR merge first
and then we will try the bot cherry-pick, but if it fails then would you be able to manually cherry-pick ? ( this was what i wanted to ask )

@seiya-koji

Copy link
Copy Markdown
Contributor Author

Got it — if the bot cherry-pick fails, I'll open the PR against main manually.

@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 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@anwesha-palit-redhat
anwesha-palit-redhat merged commit 040d039 into openshift-pipelines:master Jul 15, 2026
5 of 6 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@anwesha-palit-redhat: new pull request created: #1178

Details

In response to this:

/cherry-pick main

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 lgtm Looks Good to Me Label ok-to-test Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Pipelines list "Last run" shows a PipelineRun from a different namespace when multiple namespaces have a Pipeline with the same name

4 participants