-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat(tkresults): update filters api call #1019
base: main
Are you sure you want to change the base?
feat(tkresults): update filters api call #1019
Conversation
9643210
to
a0f63f2
Compare
8b82bfc
to
af6140d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1019 +/- ##
==========================================
+ Coverage 85.01% 85.37% +0.36%
==========================================
Files 582 582
Lines 14332 14356 +24
Branches 4010 4020 +10
==========================================
+ Hits 12184 12257 +73
+ Misses 2021 1972 -49
Partials 127 127
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
af6140d
to
7f19945
Compare
const getPipelineRunsMock = getPipelineRuns as jest.Mock; | ||
const getTaskRunsMock = getTaskRuns as jest.Mock; | ||
const getTaskRunLogMock = getTaskRunLog as jest.Mock; | ||
// const getTaskRunLogMock = getTaskRunLog as jest.Mock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this meant to be left commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, will remove this
> = ({ pipelineRun }) => { | ||
const [ecResult, ecResultLoaded] = useEnterpriseContractResults(pipelineRun); | ||
React.PropsWithChildren<{ | ||
pipelineRunName: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to pass the full pipeline run object here rather than the metadata values?
I have no objections with either strategy, I was just wondering if there was a reason why we extract the values, then pass to the component instead of passing the full object and minimizing the props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I dont think we should use the full pipeline as a prop as any change in any unrelated portion of the pipeline i.e pipeline.spec
or pipeline.status
will trigger a re-render of the component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you access pipeline run uid and name from the the task run owner reference?
src/utils/tekton-results.ts
Outdated
@@ -333,19 +340,29 @@ export const getTaskRuns = ( | |||
const getLog = (workspace: string, taskRunPath: string) => | |||
commonFetchText(`${getTRUrlPrefix(workspace)}/${taskRunPath.replace('/records/', '/logs/')}`); | |||
|
|||
export const getTaskRunLog = ( | |||
export const getTaskRunLogOld = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
src/utils/tekton-results.ts
Outdated
) => | ||
commonFetchText( | ||
`${getTRUrlPrefix(workspace)}/${namespace}/results/${pid}/logs/${taskRun?.metadata?.uid}`, | ||
).catch(() => getTaskRunLogOld(workspace, namespace, taskRun.metadata.name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using getTaskRunLogOld?
If it fails to fetch we should just throw error and surface in UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
efa6d0b
to
00838c9
Compare
a3e651e
to
6fcc21b
Compare
@abhinandan13jan: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
/retest |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinandan13jan, sahil143 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes
Please note that the new logs call takes a lot of network time.
https://issues.redhat.com/browse/KFLUXUI-40
Description
Type of change
Screen shots / Gifs for design review
How to test or reproduce?
Browser conformance: