fix(pipeline-augment): scope PipelineRun match to Pipeline namespace - #1170
Conversation
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
|
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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
Hi @seiya-koji 👋 |
|
/ok-to-test |
|
@anwesha-palit-redhat |
|
FYI — this looks like an openshift/release-side issue, but flagging it here. While testing this locally, 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 |
|
Defect verification Defect-verification.movFix verification Fix-verification.mov |
|
@seiya-koji would you please mind cherry-picking this to main ? |
|
/cherry-pick main |
|
@anwesha-palit-redhat: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
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. |
|
@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? |
my bad, i did not explain it well, we will let this PR merge first |
|
Got it — if the bot cherry-pick fails, I'll open the PR against main manually. |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
040d039
into
openshift-pipelines:master
|
@anwesha-palit-redhat: new pull request created: #1178 DetailsIn response to this:
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. |
Type of Change
Summary
augmentRunsToData()matchedPipelineRuns toPipelines using only thetekton.dev/pipelinelabel, without checking that thePipelineRun's namespace matches thePipeline's namespace.In the Pipelines list "All Projects" view, this caused every
Pipelinewith the same name across different namespaces to show the same "Last run", even when thePipelineRunonly existed in one of those namespaces.Fixes #1168
Fix: added a namespace equality check to the existing label match in
augmentRunsToData.Test plan:
pipeline-augment.spec.tsreproducing the bug: twoPipelines with the same name in different namespaces, only one of which has a matchingPipelineRun. Confirmed it fails before the fix and passes after.pipeline-augment-test-data.ts) that hadPipeline/PipelineRunnamespace mismatches, so they keep passing under the new namespace-aware matching.eslinton changed files: no issues.Screen Recordings / Screenshot
Before
Screen recordings for before/after.
Before: When a
create-tablePipeline was run in only one namespace, every namespace that had a Pipeline with the same name showed that run — thecreate-table-ixlmy2PipelineRun appeared across all of them, all with the same timestamp (Jul 10, 2026, 3:23 PM).After this fix, only the namespace where the Pipeline actually ran shows a result — each namespace now shows its own PipelineRun.