diff --git a/api-contracts/openapi/components/schemas/workflow.yaml b/api-contracts/openapi/components/schemas/workflow.yaml index 1f6796111..e102915d7 100644 --- a/api-contracts/openapi/components/schemas/workflow.yaml +++ b/api-contracts/openapi/components/schemas/workflow.yaml @@ -17,8 +17,6 @@ Workflow: items: $ref: "#/WorkflowTag" description: The tags of the workflow. - lastRun: - $ref: "./_index.yaml#/WorkflowRun" jobs: type: array items: diff --git a/api/v1/server/handlers/workflows/get.go b/api/v1/server/handlers/workflows/get.go index 4e33bf70e..7df3fa836 100644 --- a/api/v1/server/handlers/workflows/get.go +++ b/api/v1/server/handlers/workflows/get.go @@ -11,7 +11,7 @@ import ( func (t *WorkflowService) WorkflowGet(ctx echo.Context, request gen.WorkflowGetRequestObject) (gen.WorkflowGetResponseObject, error) { workflow := ctx.Get("workflow").(*db.WorkflowModel) - resp, err := transformers.ToWorkflow(workflow, nil) + resp, err := transformers.ToWorkflow(workflow) if err != nil { return nil, err diff --git a/api/v1/server/handlers/workflows/list.go b/api/v1/server/handlers/workflows/list.go index e6a1995c0..de27b5983 100644 --- a/api/v1/server/handlers/workflows/list.go +++ b/api/v1/server/handlers/workflows/list.go @@ -31,11 +31,7 @@ func (t *WorkflowService) WorkflowList(ctx echo.Context, request gen.WorkflowLis rows := make([]gen.Workflow, len(listResp.Rows)) for i := range listResp.Rows { - workflow, err := transformers.ToWorkflow(listResp.Rows[i].WorkflowModel, listResp.Rows[i].LatestRun) - - if err != nil { - return nil, err - } + workflow := transformers.ToWorkflowFromSQLC(listResp.Rows[i]) rows[i] = *workflow } diff --git a/api/v1/server/oas/gen/openapi.gen.go b/api/v1/server/oas/gen/openapi.gen.go index 5c1de077a..b9805257c 100644 --- a/api/v1/server/oas/gen/openapi.gen.go +++ b/api/v1/server/oas/gen/openapi.gen.go @@ -984,7 +984,6 @@ type Workflow struct { // Jobs The jobs of the workflow. Jobs *[]Job `json:"jobs,omitempty"` - LastRun *WorkflowRun `json:"lastRun,omitempty"` Metadata APIResourceMeta `json:"metadata"` // Name The name of the workflow. @@ -8400,93 +8399,93 @@ var swaggerSpec = []string{ "b/XmbQChWtGKgh+d00JResHGMW1ZCAn9FcGUjhGkp7TWj15sFXdiEAYgBDPVe3+9xdbZHIwhmXzuEwrH", "IY/u3iEI5/DJTuhz+ITn2Xx9BL95gW8X9CnyUURHWpkoUyYZa8Nzu6RJTr3v0ZJia4pLFWkohgOHf6su", "RjkgT89uBr/3ed2T/M/r09uRMSyz4WD5ahW/gtEqMri2GqqqRsO6rjsptcazJjxqDZPX1xytwcPrX3Cs", - "Z6cEUrnCV69FqEzR+5b6chaKZV9MQzitTtakM8nz9tXQtiJbrBhSd3CDWIfT5TGk1ngDjcqKLHbYvsDC", - "76JjnvZd5/50FRxs3DN1BJicvFNEte95aPGCUTuS+pz0XEwRJRx3ftEVTFnf3KCpEcK+NchgRNkNafps", - "E7ziK6CxsJerBzn0WUUwAn+GBPozcdtSklnEx98NLu+uh1efhv3RyOt558Or67vL/pf+6MbreTx9ofjn", - "p+HV7fXd8Or28vxuePXL4NIYLtLyfC6O4LJvabG26bvj5vI2aupFBPaMG1lHFYNzk/MiB3Bwbtw21fs3", - "HJUqTX28vTy7GfBIm/Pb4ekvF+wUPD/9ZMSfPoiS5604hc9uYD313XxIrJQiv+XzhZ8hzrcz1toa0sX5", - "8jf0fKZyzgzicKFgVZWt79EzMauPanhGljVTLKirTExAQBLk4wn2i0nA3xJICArAA4ZggkOK0r871sP6", - "Uq7Z6RLoYQ5WKz0Rpz3qIYyBl7ZivrkLVi8idHSo1fTRsLbeDNU8PqXVgkQmsTtdFlnwa8sNUdnt4qq9", - "7YuymHuk5yluG4SNleLV657nafP1+e4ibAoFvzy3GPxG66WFgkpdpqXqYxhh9SK6v2vFpyXuyov9Wi9M", - "duTGUVeCqw78uuqSp6Mzdkz3R2e153QxSk2FSZ2WS1JMk4wNk6ylerHU6c7dJltK/SjzlEUHWeANQ13Z", - "OLrWhJ+h7kEcjZhKm4XmAwep3HKnpxtkqbzN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DhBNi768OqSgw/ueoZyUJx14O6tnV19a0cvdMzmnCKab+2+ZWLefhB427p8uEOmumweuASmDGmW", + "C9ICWKLxF10Ybwk+QziCETYZf7FZuHb6gSIDcPc4Ctyen2INW4P0G46CZmjeUq2MmhePxs9gIl9UWtuj", + "S9reuj+9NH7e3OtLVYD0N5i2ZMBY4arW6V8NVozNXNm4IdKlvhEEEjQmGMpCVC945GiVfMvljjq1pVNb", + "tq+2dHWrqnaQFQtXcdboqlZt8uTJCErJgZ+lqVxKfaUo2RCwbsYaG58QPZODbZDGeC2JdkTFIe6Co14/", + "OMq1lAgj8gVyK5cSqZLxFNNZNj7wYRiO6yo4ncVMAlPUomrMJz40LxtzpoZvXZXFl/Nuoi5LCXdqgXWV", + "WKzoW2+5HQ1xqt7OztSyaVe6xoCwOJ6GaDP0xof+zulNoG/N9FYg7rujt6YnvYpkifILSnml28bjm42g", + "F/En3i69oaW9OflDPaDlohy6HqtuD2xZae8A+j5KaE3uP//e7j0S0cfbjF9WDF55QsPiS62hPrHy7qGo", + "+ox2jqTGh6Ls9JUi7iOuifJl39vRl+jjbSpmlg2+BvoSK+/oqyGjmSFpCfoK4ymuKXFwEU8JwBGA/Gzc", + "r1EwLvhAG3r0hx3BbPwtZR053aPDeDpFAcBddbDduj6Xj3VGNa735DCexhltYIY4o27cwIbaERploHRE", + "+nZsPIJ6XMlWvukyw0mLK5DWye0apL88w7vJ+KSNErh50vb3IR1F3Z1omTuRjsFmkkwgIY9xGthlqXw2", + "TkhSoNrXidRrNebmdIyzGYym+US7pGz4HLIgR1Qnzt+QOBdkVaZ0ByZK0ZQJsrTu0idakFqN5Ex/aHoT", + "bKPA2CWGUcjr3FxvQk9XJOSq84gXEDbhYSjeQdhNB0ODqGnpcVioN3TwTf7g+Mp4Q+EU9/ckVaEda75k", + "PtGWM8Icn1fsyozsYJmR/I3FpjIjvZy+ysyRMwX/wyXT2XBxErUeHDOaxRi1acNbfrt03YVFlgh62rGj", + "e2cqirQoKNJTpNP4ZH4TIbs/kr8TtLypF+gFMhzKgDCdZvsvzjvymv7WfMdpkflp+1WYbeE0sdXQOOBJ", + "r411YUVqrAhX1wMd9xui1gd8dEeW/V5qVxRBwddafq+AcZVqrWUcccx2BVu3VLD1i477yOUZ2WKTWpfE", + "qauoUSSi5Izs9iZ/DphT0kmLC1SRQVHPtdt/+N71CqUA7LhpN96m1yhmmTI0XNV0KQzlxAkt7k+7xwbr", + "zyJZ8szqtDvzMbE8iTecCU4pimyHyrmIi2/U17FFi5TEXeAOQ6qYSFBfQ4778hnuZsD489k8ca0AQW2U", + "FRTe6Tf0XALmNWTEillmkvS6RLNdOZZLeu085/oNCS6a4um0zvl4IxoACCL0uFyZR/fC6jspuW4M7LIP", + "BhN+MyEZow4U9DhXhZAiQnOewgRMEH8HzJbeXAj+HTeHSTLQdrXNE0oL5Q63ayBzrV5Zqiff1a58XZG4", + "c/V3lRxsqNzZ9EBMC9EsZQNxrbyrpI6TWP5dNH5D963vQS5vWMrJTV1RFezk3U6pgAUpbkgFVHLmIEAT", + "HGEVq9JG5BQ920qf82LOTg59Z3JI29sVL6caZXbCaQeFk75By8upxQi4MYIpSvMIuJ4xJg6lD0peZGno", + "nXjey9eX/w0AAP//vCFkwMGGAQA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/api/v1/server/oas/transformers/workflow.go b/api/v1/server/oas/transformers/workflow.go index 32ea5d097..da6a6e148 100644 --- a/api/v1/server/oas/transformers/workflow.go +++ b/api/v1/server/oas/transformers/workflow.go @@ -11,21 +11,12 @@ import ( "github.com/hatchet-dev/hatchet/pkg/repository/prisma/dbsqlc" ) -func ToWorkflow(workflow *db.WorkflowModel, lastRun *db.WorkflowRunModel) (*gen.Workflow, error) { +func ToWorkflow(workflow *db.WorkflowModel) (*gen.Workflow, error) { res := &gen.Workflow{ Metadata: *toAPIMetadata(workflow.ID, workflow.CreatedAt, workflow.UpdatedAt), Name: workflow.Name, } - if lastRun != nil { - var err error - res.LastRun, err = ToWorkflowRun(lastRun) - - if err != nil { - return nil, err - } - } - if description, ok := workflow.Description(); ok { res.Description = &description } @@ -160,7 +151,7 @@ func ToWorkflowVersion(workflow *db.WorkflowModel, version *db.WorkflowVersionMo if workflow != nil { var err error - res.Workflow, err = ToWorkflow(workflow, nil) + res.Workflow, err = ToWorkflow(workflow) if err != nil { return nil, err @@ -338,6 +329,10 @@ func ToWorkflowFromSQLC(row *dbsqlc.Workflow) *gen.Workflow { Description: &row.Description.String, } + // if lastRunAt != nil && !lastRunAt.IsZero() { + // res.LastRunAt = lastRunAt + // } + return res } diff --git a/frontend/app/src/lib/api/generated/data-contracts.ts b/frontend/app/src/lib/api/generated/data-contracts.ts index aa2c8fb23..fcda89f54 100644 --- a/frontend/app/src/lib/api/generated/data-contracts.ts +++ b/frontend/app/src/lib/api/generated/data-contracts.ts @@ -502,7 +502,6 @@ export interface Workflow { versions?: WorkflowVersionMeta[]; /** The tags of the workflow. */ tags?: WorkflowTag[]; - lastRun?: WorkflowRun; /** The jobs of the workflow. */ jobs?: Job[]; } diff --git a/frontend/app/src/pages/main/workflows/components/workflow-table.tsx b/frontend/app/src/pages/main/workflows/components/workflow-table.tsx index 538ab7a89..5d51190f7 100644 --- a/frontend/app/src/pages/main/workflows/components/workflow-table.tsx +++ b/frontend/app/src/pages/main/workflows/components/workflow-table.tsx @@ -90,13 +90,9 @@ export function WorkflowTable() { {data.name}
- Last run{' '}
- {data.lastRun?.metadata?.createdAt ? (
-
+ {/* Last run{' '}
+ {data.lastRunAt ?
*/}
Created at