Skip to content

Commit

Permalink
Merge branch 'feat/compact-workflow-runs-4' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
daryllimyt committed Jan 23, 2025
2 parents 111a504 + a401a1f commit 36ecdb1
Show file tree
Hide file tree
Showing 38 changed files with 501 additions and 349 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "react18-json-view/src/style.css"
import { useParams } from "next/navigation"
import { History } from "lucide-react"

import { formatExecutionId } from "@/lib/event-history"
import { WorkflowExecutionEventDetailView } from "@/components/executions/event-details"
import { WorkflowExecutionEventHistory } from "@/components/executions/event-history"
import { SectionHead } from "@/components/executions/section"
Expand All @@ -30,7 +31,7 @@ export default function ExecutionPage() {
WorkflowExecutionEvent | undefined
>()

const fullExecutionId = `${workflowId}:${executionId}`
const fullExecutionId = formatExecutionId(workflowId, executionId)
return (
<ResizablePanelGroup
direction="horizontal"
Expand Down
71 changes: 50 additions & 21 deletions frontend/src/client/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,16 @@ export const $ActionControlFlow = {
export const $ActionCreate = {
properties: {
workflow_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
anyOf: [
{
type: "string",
pattern: "wf_[0-9a-zA-Z]+",
},
{
type: "string",
pattern: "wf-[0-9a-f]{32}",
},
],
title: "Workflow Id",
},
type: {
Expand Down Expand Up @@ -133,7 +141,7 @@ export const $ActionReadMinimal = {
},
workflow_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
pattern: "wf_[0-9a-zA-Z]+",
title: "Workflow Id",
},
type: {
Expand Down Expand Up @@ -768,7 +776,6 @@ export const $DSLRunArgs = {
},
wf_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
title: "Wf Id",
},
trigger_inputs: {
Expand Down Expand Up @@ -1052,7 +1059,8 @@ export const $EventGroup = {
anyOf: [
{
type: "string",
pattern: "wf-[0-9a-f]{32}:(exec-[\\w-]+|sch-[0-9a-f]{32}-.*)",
pattern:
"(?P<workflow_id>wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/](?P<execution_id>(exec_[0-9a-zA-Z]+|exec-[\\w-]+|sch-[0-9a-f]{32}-.*))",
},
{
type: "null",
Expand Down Expand Up @@ -1128,7 +1136,6 @@ export const $GetWorkflowDefinitionActivityInputs = {
},
workflow_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
title: "Workflow Id",
},
version: {
Expand Down Expand Up @@ -2297,12 +2304,12 @@ export const $RunContext = {
properties: {
wf_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
title: "Wf Id",
},
wf_exec_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}:(exec-[\\w-]+|sch-[0-9a-f]{32}-.*)",
pattern:
"(?P<workflow_id>wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/](?P<execution_id>(exec_[0-9a-zA-Z]+|exec-[\\w-]+|sch-[0-9a-f]{32}-.*))",
title: "Wf Exec Id",
},
wf_run_id: {
Expand Down Expand Up @@ -2515,8 +2522,16 @@ export const $Schedule = {
export const $ScheduleCreate = {
properties: {
workflow_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
anyOf: [
{
type: "string",
pattern: "wf_[0-9a-zA-Z]+",
},
{
type: "string",
pattern: "wf-[0-9a-f]{32}",
},
],
title: "Workflow Id",
},
inputs: {
Expand Down Expand Up @@ -3825,6 +3840,7 @@ export const $WorkflowCommitResponse = {
properties: {
workflow_id: {
type: "string",
pattern: "wf_[0-9a-zA-Z]+",
title: "Workflow Id",
},
status: {
Expand Down Expand Up @@ -3956,8 +3972,16 @@ export const $WorkflowEventType = {
export const $WorkflowExecutionCreate = {
properties: {
workflow_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
anyOf: [
{
type: "string",
pattern: "wf_[0-9a-zA-Z]+",
},
{
type: "string",
pattern: "wf-[0-9a-f]{32}",
},
],
title: "Workflow Id",
},
inputs: {
Expand All @@ -3983,12 +4007,12 @@ export const $WorkflowExecutionCreateResponse = {
},
wf_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
title: "Wf Id",
},
wf_exec_id: {
type: "string",
pattern: "wf-[0-9a-f]{32}:(exec-[\\w-]+|sch-[0-9a-f]{32}-.*)",
pattern:
"(?P<workflow_id>wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/](?P<execution_id>(exec_[0-9a-zA-Z]+|exec-[\\w-]+|sch-[0-9a-f]{32}-.*))",
title: "Wf Exec Id",
},
},
Expand Down Expand Up @@ -4060,7 +4084,8 @@ export const $WorkflowExecutionEvent = {
anyOf: [
{
type: "string",
pattern: "wf-[0-9a-f]{32}:(exec-[\\w-]+|sch-[0-9a-f]{32}-.*)",
pattern:
"(?P<workflow_id>wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/](?P<execution_id>(exec_[0-9a-zA-Z]+|exec-[\\w-]+|sch-[0-9a-f]{32}-.*))",
},
{
type: "null",
Expand Down Expand Up @@ -4156,7 +4181,8 @@ export const $WorkflowExecutionEventCompact = {
anyOf: [
{
type: "string",
pattern: "wf-[0-9a-f]{32}:(exec-[\\w-]+|sch-[0-9a-f]{32}-.*)",
pattern:
"(?P<workflow_id>wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/](?P<execution_id>(exec_[0-9a-zA-Z]+|exec-[\\w-]+|sch-[0-9a-f]{32}-.*))",
},
{
type: "null",
Expand Down Expand Up @@ -4266,7 +4292,8 @@ export const $WorkflowExecutionRead = {
anyOf: [
{
type: "string",
pattern: "wf-[0-9a-f]{32}:(exec-[\\w-]+|sch-[0-9a-f]{32}-.*)",
pattern:
"(?P<workflow_id>wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/](?P<execution_id>(exec_[0-9a-zA-Z]+|exec-[\\w-]+|sch-[0-9a-f]{32}-.*))",
},
{
type: "null",
Expand Down Expand Up @@ -4370,7 +4397,8 @@ export const $WorkflowExecutionReadCompact = {
anyOf: [
{
type: "string",
pattern: "wf-[0-9a-f]{32}:(exec-[\\w-]+|sch-[0-9a-f]{32}-.*)",
pattern:
"(?P<workflow_id>wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/](?P<execution_id>(exec_[0-9a-zA-Z]+|exec-[\\w-]+|sch-[0-9a-f]{32}-.*))",
},
{
type: "null",
Expand Down Expand Up @@ -4474,7 +4502,8 @@ export const $WorkflowExecutionReadMinimal = {
anyOf: [
{
type: "string",
pattern: "wf-[0-9a-f]{32}:(exec-[\\w-]+|sch-[0-9a-f]{32}-.*)",
pattern:
"(?P<workflow_id>wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/](?P<execution_id>(exec_[0-9a-zA-Z]+|exec-[\\w-]+|sch-[0-9a-f]{32}-.*))",
},
{
type: "null",
Expand Down Expand Up @@ -4518,7 +4547,7 @@ export const $WorkflowRead = {
properties: {
id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
pattern: "wf_[0-9a-zA-Z]+",
title: "Id",
},
title: {
Expand Down Expand Up @@ -4665,7 +4694,7 @@ export const $WorkflowReadMinimal = {
properties: {
id: {
type: "string",
pattern: "wf-[0-9a-f]{32}",
pattern: "wf_[0-9a-zA-Z]+",
title: "Id",
},
title: {
Expand Down
34 changes: 17 additions & 17 deletions frontend/src/client/services.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ import type {
* This is an external facing endpoint is used to trigger a workflow by sending a webhook request.
* The workflow is identified by the `path` parameter, which is equivalent to the workflow id.
* @param data The data for the request.
* @param data.path
* @param data.secret
* @param data.workflowId
* @param data.contentType
* @returns WorkflowExecutionCreateResponse Successful Response
* @throws ApiError
Expand All @@ -220,10 +220,10 @@ export const publicIncomingWebhook = (
): CancelablePromise<PublicIncomingWebhookResponse> => {
return __request(OpenAPI, {
method: "POST",
url: "/webhooks/{path}/{secret}",
url: "/webhooks/{workflow_id}/{secret}",
path: {
path: data.path,
secret: data.secret,
workflow_id: data.workflowId,
},
headers: {
"content-type": data.contentType,
Expand All @@ -241,8 +241,8 @@ export const publicIncomingWebhook = (
* This is an external facing endpoint is used to trigger a workflow by sending a webhook request.
* The workflow is identified by the `path` parameter, which is equivalent to the workflow id.
* @param data The data for the request.
* @param data.path
* @param data.secret
* @param data.workflowId
* @param data.contentType
* @returns unknown Successful Response
* @throws ApiError
Expand All @@ -252,10 +252,10 @@ export const publicIncomingWebhookWait = (
): CancelablePromise<PublicIncomingWebhookWaitResponse> => {
return __request(OpenAPI, {
method: "POST",
url: "/webhooks/{path}/{secret}/wait",
url: "/webhooks/{workflow_id}/{secret}/wait",
path: {
path: data.path,
secret: data.secret,
workflow_id: data.workflowId,
},
headers: {
"content-type": data.contentType,
Expand Down Expand Up @@ -853,10 +853,10 @@ export const triggersUpdateWebhook = (
* List all workflow executions.
* @param data The data for the request.
* @param data.workspaceId
* @param data.workflowId
* @param data.trigger
* @param data.userId
* @param data.limit
* @param data.workflowId
* @returns WorkflowExecutionReadMinimal Successful Response
* @throws ApiError
*/
Expand All @@ -867,11 +867,11 @@ export const workflowExecutionsListWorkflowExecutions = (
method: "GET",
url: "/workflow-executions",
query: {
workflow_id: data.workflowId,
trigger: data.trigger,
user_id: data.userId,
limit: data.limit,
workspace_id: data.workspaceId,
workflow_id: data.workflowId,
},
errors: {
422: "Validation Error",
Expand Down Expand Up @@ -1020,8 +1020,8 @@ export const workflowExecutionsTerminateWorkflowExecution = (
* List Actions
* List all actions for a workflow.
* @param data The data for the request.
* @param data.workflowId
* @param data.workspaceId
* @param data.workflowId
* @returns ActionReadMinimal Successful Response
* @throws ApiError
*/
Expand All @@ -1032,8 +1032,8 @@ export const actionsListActions = (
method: "GET",
url: "/actions",
query: {
workflow_id: data.workflowId,
workspace_id: data.workspaceId,
workflow_id: data.workflowId,
},
errors: {
422: "Validation Error",
Expand Down Expand Up @@ -1072,8 +1072,8 @@ export const actionsCreateAction = (
* Get an action.
* @param data The data for the request.
* @param data.actionId
* @param data.workflowId
* @param data.workspaceId
* @param data.workflowId
* @returns ActionRead Successful Response
* @throws ApiError
*/
Expand All @@ -1087,8 +1087,8 @@ export const actionsGetAction = (
action_id: data.actionId,
},
query: {
workflow_id: data.workflowId,
workspace_id: data.workspaceId,
workflow_id: data.workflowId,
},
errors: {
422: "Validation Error",
Expand Down Expand Up @@ -1213,8 +1213,8 @@ export const workflowsAddTag = (
/**
* Remove Tag
* @param data The data for the request.
* @param data.workflowId
* @param data.tagId
* @param data.workflowId
* @param data.workspaceId
* @returns void Successful Response
* @throws ApiError
Expand All @@ -1226,8 +1226,8 @@ export const workflowsRemoveTag = (
method: "DELETE",
url: "/workflows/{workflow_id}/tags/{tag_id}",
path: {
workflow_id: data.workflowId,
tag_id: data.tagId,
workflow_id: data.workflowId,
},
query: {
workspace_id: data.workspaceId,
Expand Down Expand Up @@ -1419,8 +1419,8 @@ export const schedulesListSchedules = (
method: "GET",
url: "/schedules",
query: {
workflow_id: data.workflowId,
workspace_id: data.workspaceId,
workflow_id: data.workflowId,
},
errors: {
422: "Validation Error",
Expand Down Expand Up @@ -1840,8 +1840,8 @@ export const editorListFunctions = (
/**
* List Actions
* @param data The data for the request.
* @param data.workflowId
* @param data.workspaceId
* @param data.workflowId
* @returns EditorActionRead Successful Response
* @throws ApiError
*/
Expand All @@ -1852,8 +1852,8 @@ export const editorListActions = (
method: "GET",
url: "/editor/actions",
query: {
workflow_id: data.workflowId,
workspace_id: data.workspaceId,
workflow_id: data.workflowId,
},
errors: {
422: "Validation Error",
Expand Down
Loading

0 comments on commit 36ecdb1

Please sign in to comment.