-
Notifications
You must be signed in to change notification settings - Fork 167
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
add taskName parameter to parseRuntimeInfoFromExecutions function #2819
add taskName parameter to parseRuntimeInfoFromExecutions function #2819
Conversation
…imeInfoFromExecutions add taskName parameter to parseRuntimeInfoFromExecutions function refactor: update parseUtils to handle taskName or taskId in parseRuntimeInfoFromExecutions
6189510
to
dbaf361
Compare
executions?: Execution[] | null, | ||
): PipelineTaskRunStatus | undefined => { | ||
if (!executions) { | ||
return undefined; | ||
} | ||
|
||
const execution = executions.find( | ||
(e) => e.getCustomPropertiesMap().get('task_name')?.getStringValue() === taskId, | ||
(e) => e.getCustomPropertiesMap().get('task_name')?.getStringValue() === (taskName || taskId), |
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.
If both of taskName
& taskId
props are required and not possibly undefined
(since the type is simply string
, this will always use the taskName. Maybe taskName is meant to be optional and just used to override the usage of taskId?
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.
not necessarily. I used ||
which will used the taskId if taskName is ""
, which is what i noticed in cases where the label is empty for some reason.
in JS:
a = "";
b = "defined"
a || b == "defined"
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.
Just a small comment, otherwise looks good.
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: jpuzz0 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 |
closes: https://issues.redhat.com/browse/RHOAIENG-7079
Description
How Has This Been Tested?
Test Impact
none, small mlmd fix in for backend
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main