-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[UI v2] feat: Adding concurrency-limit-task-run-card component #16444
Conversation
e08e3bc
to
1b0e12d
Compare
ui-v2/src/utilities/seconds.ts
Outdated
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.
ported over from other repo
1b0e12d
to
f30d85b
Compare
887d012
to
4e28f9e
Compare
@devinvillarosa IIRC was have "RunCards" like this all over. What's "concurrency"-y about this component? |
4e28f9e
to
4424975
Compare
ahh makes sense. I don't mind revisiting this and make a more generic |
d577f94
to
e08d97f
Compare
Actually, I see what you mean. I updated the component to be just |
fe9e370
to
6f74262
Compare
@@ -0,0 +1,143 @@ | |||
import { components } from "@/api/prefect"; | |||
|
|||
export const MOCK_TASK_RUN: components["schemas"]["TaskRun"] = { |
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.
It'd be cool to use @faker-js/faker
to generate random task runs for display. I've been doing that for deployments, and it's helped me uncover some edge cases when working with display components like this.
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.
ok, I've started to centralize some reusable schemas using faker in @/storybook/utils/mocks
if (!flow.id || !flowRun.id) { | ||
throw new Error("'id' field expected"); | ||
} |
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.
Task runs aren't guaranteed to have a parent flow run, so we'll need to handle this case without erroring.
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.
I think I addressed this in the latest push
432e981
to
ac0357c
Compare
d0825b2
to
9426006
Compare
9426006
to
8b72c80
Compare
8b72c80
to
c7fb16b
Compare
flowRun?: components["schemas"]["FlowRun"]; | ||
/** If task run is included, uses fields from task run over flow run */ | ||
taskRun?: components["schemas"]["TaskRun"]; |
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.
I think we may want to make this parentRun
and run
in the future to be more flexible and handle more cases, but this is good for now since it has parity with the current UI.
/runs/task-run/$id
@/utilities/seconds
RunCard
component to be usedChecklist
<link to issue>
"mint.json
.Relates to #15512