Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(KFLUXUI-253): tekton results should filter deleted record out #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

testcara
Copy link
Contributor

@testcara testcara commented Dec 13, 2024

Fixes

https://issues.redhat.com/browse/KFLUXUI-253

Description

When we delete one pipeline task run manually before it is completed,UI should not always keep the obsoleted run there. This patch would ignore the meaningless unknown tekton results to ensure there is no deleted but 'in process' runs on UI.

Type of change

  • Feature
  • Bugfix
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Screen shots / Gifs for design review

Without the patch, the UI would list deleted 'running' pipelineruns.
Screenshot 2024-12-16 at 15 03 19
With the patch, the UI would ignore the deleted 'running' pipelineruns.
Screenshot 2024-12-16 at 15 05 12

How to test or reproduce?

  1. Navigate to 'Activity' of one component.
  2. Rerun some jobs and delete it by oc
  3. Refresh the page, the running ones would be not shown

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@testcara testcara force-pushed the KFLUXUI-253 branch 2 times, most recently from 6cf087c to cfa1ecd Compare December 14, 2024 02:12
@testcara
Copy link
Contributor Author

/retest

@testcara testcara changed the title WIP: fix(KFLUXUI-253): tekton results should filter unknown status record out fix(KFLUXUI-253): tekton results should filter unknown status record out Dec 14, 2024
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.02%. Comparing base (7c5807c) to head (83e44a8).

Files with missing lines Patch % Lines
src/utils/tekton-results.ts 60.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main      #55    +/-   ##
========================================
  Coverage   80.01%   80.02%            
========================================
  Files         569      569            
  Lines       21379    21383     +4     
  Branches     5294     5037   -257     
========================================
+ Hits        17107    17111     +4     
- Misses       4247     4248     +1     
+ Partials       25       24     -1     
Flag Coverage Δ
unittests 80.02% <60.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@testcara testcara force-pushed the KFLUXUI-253 branch 3 times, most recently from 0b59a41 to 7c5062b Compare December 16, 2024 10:38
Comment on lines 306 to 328
// When pipelines are running, the etcd would keep their results.
// deleting pipelines frome ectd would make unknown tekton results.
// Just to get meaningful test runs, we need to filter 'unknown' out.
const filteredPipelineRuns = originalPipelineRuns.filter((pipelinerun) => {
return pipelinerun.status?.conditions?.every((c) => c.status !== 'Unknown') ?? true;
});
return [filteredPipelineRuns, list];
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible that an unknown status will appear for the pipeline runs that were not deleted? In that case, It's not a good idea to filter out the Unknown status pipeline runs.

Choose a reason for hiding this comment

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

Can you specify why it is not good idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just improved the filter condition to ensure it is more accurate and added more explanations. Could you help to review again? Thank you!

@testcara testcara changed the title fix(KFLUXUI-253): tekton results should filter unknown status record out fix(KFLUXUI-253): tekton results should filter deleted record out Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants