From d3534edc4c2fa3aca0c369595a99880a62a8b644 Mon Sep 17 00:00:00 2001 From: abelanger5 Date: Mon, 4 Mar 2024 15:39:54 -0800 Subject: [PATCH] fix: parse schema in API, not engine (#233) * no schema parsing in core engine * fix: parse schema in api, not engine * fix: parsing of input schema should not use json keys as field names --- .../components/schemas/workflow_run.yaml | 2 - api-contracts/openapi/openapi.yaml | 2 + .../openapi/paths/step-run/step-run.yaml | 52 +++ .../openapi/paths/workflow/workflow.yaml | 38 ++ .../server/handlers/step-runs/get_schema.go | 36 ++ api/v1/server/handlers/workflows/delete.go | 21 + api/v1/server/oas/gen/openapi.gen.go | 421 +++++++++++++----- .../server/oas/transformers/workflow_run.go | 4 - frontend/app/src/components/ui/json-form.tsx | 4 +- frontend/app/src/lib/api/generated/Api.ts | 33 ++ .../src/lib/api/generated/data-contracts.ts | 1 - frontend/app/src/lib/api/queries.ts | 4 + .../$run/components/step-run-inputs.tsx | 8 +- .../$run/components/step-run-playground.tsx | 17 +- internal/schema/schema.go | 24 +- .../services/controllers/jobs/controller.go | 60 +-- internal/services/dispatcher/server.go | 19 +- .../clients/rest/api/step_run_api.py | 283 ++++++++++++ .../clients/rest/api/workflow_api.py | 268 +++++++++++ .../clients/rest/models/step_run.py | 6 +- .../src/clients/rest/generated/Api.ts | 33 ++ .../clients/rest/generated/data-contracts.ts | 1 - 22 files changed, 1151 insertions(+), 186 deletions(-) create mode 100644 api/v1/server/handlers/step-runs/get_schema.go create mode 100644 api/v1/server/handlers/workflows/delete.go diff --git a/api-contracts/openapi/components/schemas/workflow_run.yaml b/api-contracts/openapi/components/schemas/workflow_run.yaml index 7ad962d5a..1248ddcd6 100644 --- a/api-contracts/openapi/components/schemas/workflow_run.yaml +++ b/api-contracts/openapi/components/schemas/workflow_run.yaml @@ -210,8 +210,6 @@ StepRun: type: string cancelledError: type: string - inputSchema: - type: string required: - metadata - tenantId diff --git a/api-contracts/openapi/openapi.yaml b/api-contracts/openapi/openapi.yaml index 310ad1cd2..43511820a 100644 --- a/api-contracts/openapi/openapi.yaml +++ b/api-contracts/openapi/openapi.yaml @@ -106,6 +106,8 @@ paths: $ref: "./paths/step-run/step-run.yaml#/stepRunScoped" /api/v1/tenants/{tenant}/step-runs/{step-run}/rerun: $ref: "./paths/step-run/step-run.yaml#/rerunStepRun" + /api/v1/tenants/{tenant}/step-runs/{step-run}/schema: + $ref: "./paths/step-run/step-run.yaml#/getSchema" /api/v1/tenants/{tenant}/worker: $ref: "./paths/worker/worker.yaml#/withTenant" /api/v1/workers/{worker}: diff --git a/api-contracts/openapi/paths/step-run/step-run.yaml b/api-contracts/openapi/paths/step-run/step-run.yaml index 4cd1786a5..acdf75467 100644 --- a/api-contracts/openapi/paths/step-run/step-run.yaml +++ b/api-contracts/openapi/paths/step-run/step-run.yaml @@ -104,3 +104,55 @@ rerunStepRun: summary: Rerun step run tags: - Step Run +getSchema: + get: + x-resources: ["tenant", "step-run"] + description: Get the schema for a step run + operationId: step-run:get:schema + parameters: + - description: The tenant id + in: path + name: tenant + required: true + schema: + type: string + format: uuid + minLength: 36 + maxLength: 36 + - description: The step run id + in: path + name: step-run + required: true + schema: + type: string + format: uuid + minLength: 36 + maxLength: 36 + responses: + "200": + content: + application/json: + schema: + type: object + description: Successfully retrieved the step run schema + "400": + content: + application/json: + schema: + $ref: "../../components/schemas/_index.yaml#/APIErrors" + description: A malformed or bad request + "403": + content: + application/json: + schema: + $ref: "../../components/schemas/_index.yaml#/APIErrors" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "../../components/schemas/_index.yaml#/APIErrors" + description: The step run was not found + summary: Get step run schema + tags: + - Step Run diff --git a/api-contracts/openapi/paths/workflow/workflow.yaml b/api-contracts/openapi/paths/workflow/workflow.yaml index a8a94f7fb..7b53b760b 100644 --- a/api-contracts/openapi/paths/workflow/workflow.yaml +++ b/api-contracts/openapi/paths/workflow/workflow.yaml @@ -72,6 +72,44 @@ withWorkflow: summary: Get workflow tags: - Workflow + delete: + x-resources: ["tenant", "workflow"] + description: Delete a workflow for a tenant + operationId: workflow:delete + parameters: + - description: The workflow id + in: path + name: workflow + required: true + schema: + type: string + format: uuid + minLength: 36 + maxLength: 36 + responses: + "204": + description: Successfully deleted the workflow + "400": + content: + application/json: + schema: + $ref: "../../components/schemas/_index.yaml#/APIErrors" + description: A malformed or bad request + "403": + content: + application/json: + schema: + $ref: "../../components/schemas/_index.yaml#/APIErrors" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "../../components/schemas/_index.yaml#/APIErrors" + description: Not found + summary: Delete workflow + tags: + - Workflow workflowVersion: get: x-resources: ["tenant", "workflow"] diff --git a/api/v1/server/handlers/step-runs/get_schema.go b/api/v1/server/handlers/step-runs/get_schema.go new file mode 100644 index 000000000..435c46373 --- /dev/null +++ b/api/v1/server/handlers/step-runs/get_schema.go @@ -0,0 +1,36 @@ +package stepruns + +import ( + "encoding/json" + "fmt" + + "github.com/labstack/echo/v4" + + "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + "github.com/hatchet-dev/hatchet/internal/repository/prisma/db" + "github.com/hatchet-dev/hatchet/internal/schema" +) + +func (t *StepRunService) StepRunGetSchema(ctx echo.Context, request gen.StepRunGetSchemaRequestObject) (gen.StepRunGetSchemaResponseObject, error) { + stepRun := ctx.Get("step-run").(*db.StepRunModel) + + var res map[string]interface{} + + input, ok := stepRun.Input() + + if ok { + schemaBytes, err := schema.SchemaBytesFromBytes(input) + + if err != nil { + return nil, fmt.Errorf("could not get schema bytes: %w", err) + } + + err = json.Unmarshal(schemaBytes, &res) + + if err != nil { + return nil, fmt.Errorf("could not unmarshal schema: %w", err) + } + } + + return gen.StepRunGetSchema200JSONResponse(res), nil +} diff --git a/api/v1/server/handlers/workflows/delete.go b/api/v1/server/handlers/workflows/delete.go new file mode 100644 index 000000000..107876205 --- /dev/null +++ b/api/v1/server/handlers/workflows/delete.go @@ -0,0 +1,21 @@ +package workflows + +import ( + "github.com/labstack/echo/v4" + + "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + "github.com/hatchet-dev/hatchet/internal/repository/prisma/db" +) + +func (t *WorkflowService) WorkflowDelete(ctx echo.Context, request gen.WorkflowDeleteRequestObject) (gen.WorkflowDeleteResponseObject, error) { + tenant := ctx.Get("tenant").(*db.TenantModel) + workflow := ctx.Get("workflow").(*db.WorkflowModel) + + workflow, err := t.config.Repository.Workflow().DeleteWorkflow(tenant.ID, workflow.ID) + + if err != nil { + return nil, err + } + + return gen.WorkflowDelete204Response{}, nil +} diff --git a/api/v1/server/oas/gen/openapi.gen.go b/api/v1/server/oas/gen/openapi.gen.go index cd21a45eb..27848c13c 100644 --- a/api/v1/server/oas/gen/openapi.gen.go +++ b/api/v1/server/oas/gen/openapi.gen.go @@ -460,7 +460,6 @@ type StepRun struct { FinishedAt *time.Time `json:"finishedAt,omitempty"` FinishedAtEpoch *int `json:"finishedAtEpoch,omitempty"` Input *string `json:"input,omitempty"` - InputSchema *string `json:"inputSchema,omitempty"` JobRun *JobRun `json:"jobRun,omitempty"` JobRunId string `json:"jobRunId"` Metadata APIResourceMeta `json:"metadata"` @@ -978,6 +977,9 @@ type ServerInterface interface { // Rerun step run // (POST /api/v1/tenants/{tenant}/step-runs/{step-run}/rerun) StepRunUpdateRerun(ctx echo.Context, tenant openapi_types.UUID, stepRun openapi_types.UUID) error + // Get step run schema + // (GET /api/v1/tenants/{tenant}/step-runs/{step-run}/schema) + StepRunGetSchema(ctx echo.Context, tenant openapi_types.UUID, stepRun openapi_types.UUID) error // Get workers // (GET /api/v1/tenants/{tenant}/worker) WorkerList(ctx echo.Context, tenant openapi_types.UUID) error @@ -1032,6 +1034,9 @@ type ServerInterface interface { // Get worker // (GET /api/v1/workers/{worker}) WorkerGet(ctx echo.Context, worker openapi_types.UUID) error + // Delete workflow + // (DELETE /api/v1/workflows/{workflow}) + WorkflowDelete(ctx echo.Context, workflow openapi_types.UUID) error // Get workflow // (GET /api/v1/workflows/{workflow}) WorkflowGet(ctx echo.Context, workflow openapi_types.UUID) error @@ -1693,6 +1698,34 @@ func (w *ServerInterfaceWrapper) StepRunUpdateRerun(ctx echo.Context) error { return err } +// StepRunGetSchema converts echo context to params. +func (w *ServerInterfaceWrapper) StepRunGetSchema(ctx echo.Context) error { + var err error + // ------------- Path parameter "tenant" ------------- + var tenant openapi_types.UUID + + err = runtime.BindStyledParameterWithLocation("simple", false, "tenant", runtime.ParamLocationPath, ctx.Param("tenant"), &tenant) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter tenant: %s", err)) + } + + // ------------- Path parameter "step-run" ------------- + var stepRun openapi_types.UUID + + err = runtime.BindStyledParameterWithLocation("simple", false, "step-run", runtime.ParamLocationPath, ctx.Param("step-run"), &stepRun) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter step-run: %s", err)) + } + + ctx.Set(BearerAuthScopes, []string{}) + + ctx.Set(CookieAuthScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.StepRunGetSchema(ctx, tenant, stepRun) + return err +} + // WorkerList converts echo context to params. func (w *ServerInterfaceWrapper) WorkerList(ctx echo.Context) error { var err error @@ -1996,6 +2029,26 @@ func (w *ServerInterfaceWrapper) WorkerGet(ctx echo.Context) error { return err } +// WorkflowDelete converts echo context to params. +func (w *ServerInterfaceWrapper) WorkflowDelete(ctx echo.Context) error { + var err error + // ------------- Path parameter "workflow" ------------- + var workflow openapi_types.UUID + + err = runtime.BindStyledParameterWithLocation("simple", false, "workflow", runtime.ParamLocationPath, ctx.Param("workflow"), &workflow) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter workflow: %s", err)) + } + + ctx.Set(BearerAuthScopes, []string{}) + + ctx.Set(CookieAuthScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.WorkflowDelete(ctx, workflow) + return err +} + // WorkflowGet converts echo context to params. func (w *ServerInterfaceWrapper) WorkflowGet(ctx echo.Context) error { var err error @@ -2179,6 +2232,7 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL router.GET(baseURL+"/api/v1/tenants/:tenant/members", wrapper.TenantMemberList) router.GET(baseURL+"/api/v1/tenants/:tenant/step-runs/:step-run", wrapper.StepRunGet) router.POST(baseURL+"/api/v1/tenants/:tenant/step-runs/:step-run/rerun", wrapper.StepRunUpdateRerun) + router.GET(baseURL+"/api/v1/tenants/:tenant/step-runs/:step-run/schema", wrapper.StepRunGetSchema) router.GET(baseURL+"/api/v1/tenants/:tenant/worker", wrapper.WorkerList) router.GET(baseURL+"/api/v1/tenants/:tenant/workflow-runs/:workflow-run", wrapper.WorkflowRunGet) router.GET(baseURL+"/api/v1/tenants/:tenant/workflow-runs/:workflow-run/prs", wrapper.WorkflowRunListPullRequests) @@ -2197,6 +2251,7 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL router.GET(baseURL+"/api/v1/users/memberships", wrapper.TenantMembershipsList) router.POST(baseURL+"/api/v1/users/register", wrapper.UserCreate) router.GET(baseURL+"/api/v1/workers/:worker", wrapper.WorkerGet) + router.DELETE(baseURL+"/api/v1/workflows/:workflow", wrapper.WorkflowDelete) router.GET(baseURL+"/api/v1/workflows/:workflow", wrapper.WorkflowGet) router.POST(baseURL+"/api/v1/workflows/:workflow/link-github", wrapper.WorkflowUpdateLinkGithub) router.POST(baseURL+"/api/v1/workflows/:workflow/trigger", wrapper.WorkflowRunCreate) @@ -3213,6 +3268,51 @@ func (response StepRunUpdateRerun403JSONResponse) VisitStepRunUpdateRerunRespons return json.NewEncoder(w).Encode(response) } +type StepRunGetSchemaRequestObject struct { + Tenant openapi_types.UUID `json:"tenant"` + StepRun openapi_types.UUID `json:"step-run"` +} + +type StepRunGetSchemaResponseObject interface { + VisitStepRunGetSchemaResponse(w http.ResponseWriter) error +} + +type StepRunGetSchema200JSONResponse map[string]interface{} + +func (response StepRunGetSchema200JSONResponse) VisitStepRunGetSchemaResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type StepRunGetSchema400JSONResponse APIErrors + +func (response StepRunGetSchema400JSONResponse) VisitStepRunGetSchemaResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type StepRunGetSchema403JSONResponse APIErrors + +func (response StepRunGetSchema403JSONResponse) VisitStepRunGetSchemaResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type StepRunGetSchema404JSONResponse APIErrors + +func (response StepRunGetSchema404JSONResponse) VisitStepRunGetSchemaResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + type WorkerListRequestObject struct { Tenant openapi_types.UUID `json:"tenant"` } @@ -3821,6 +3921,49 @@ func (response WorkerGet403JSONResponse) VisitWorkerGetResponse(w http.ResponseW return json.NewEncoder(w).Encode(response) } +type WorkflowDeleteRequestObject struct { + Workflow openapi_types.UUID `json:"workflow"` +} + +type WorkflowDeleteResponseObject interface { + VisitWorkflowDeleteResponse(w http.ResponseWriter) error +} + +type WorkflowDelete204Response struct { +} + +func (response WorkflowDelete204Response) VisitWorkflowDeleteResponse(w http.ResponseWriter) error { + w.WriteHeader(204) + return nil +} + +type WorkflowDelete400JSONResponse APIErrors + +func (response WorkflowDelete400JSONResponse) VisitWorkflowDeleteResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type WorkflowDelete403JSONResponse APIErrors + +func (response WorkflowDelete403JSONResponse) VisitWorkflowDeleteResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type WorkflowDelete404JSONResponse APIErrors + +func (response WorkflowDelete404JSONResponse) VisitWorkflowDeleteResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + type WorkflowGetRequestObject struct { Workflow openapi_types.UUID `json:"workflow"` } @@ -4094,6 +4237,8 @@ type StrictServerInterface interface { StepRunUpdateRerun(ctx echo.Context, request StepRunUpdateRerunRequestObject) (StepRunUpdateRerunResponseObject, error) + StepRunGetSchema(ctx echo.Context, request StepRunGetSchemaRequestObject) (StepRunGetSchemaResponseObject, error) + WorkerList(ctx echo.Context, request WorkerListRequestObject) (WorkerListResponseObject, error) WorkflowRunGet(ctx echo.Context, request WorkflowRunGetRequestObject) (WorkflowRunGetResponseObject, error) @@ -4130,6 +4275,8 @@ type StrictServerInterface interface { WorkerGet(ctx echo.Context, request WorkerGetRequestObject) (WorkerGetResponseObject, error) + WorkflowDelete(ctx echo.Context, request WorkflowDeleteRequestObject) (WorkflowDeleteResponseObject, error) + WorkflowGet(ctx echo.Context, request WorkflowGetRequestObject) (WorkflowGetResponseObject, error) WorkflowUpdateLinkGithub(ctx echo.Context, request WorkflowUpdateLinkGithubRequestObject) (WorkflowUpdateLinkGithubResponseObject, error) @@ -4889,6 +5036,32 @@ func (sh *strictHandler) StepRunUpdateRerun(ctx echo.Context, tenant openapi_typ return nil } +// StepRunGetSchema operation middleware +func (sh *strictHandler) StepRunGetSchema(ctx echo.Context, tenant openapi_types.UUID, stepRun openapi_types.UUID) error { + var request StepRunGetSchemaRequestObject + + request.Tenant = tenant + request.StepRun = stepRun + + handler := func(ctx echo.Context, request interface{}) (interface{}, error) { + return sh.ssi.StepRunGetSchema(ctx, request.(StepRunGetSchemaRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "StepRunGetSchema") + } + + response, err := handler(ctx, request) + + if err != nil { + return err + } else if validResponse, ok := response.(StepRunGetSchemaResponseObject); ok { + return validResponse.VisitStepRunGetSchemaResponse(ctx.Response()) + } else if response != nil { + return fmt.Errorf("Unexpected response type: %T", response) + } + return nil +} + // WorkerList operation middleware func (sh *strictHandler) WorkerList(ctx echo.Context, tenant openapi_types.UUID) error { var request WorkerListRequestObject @@ -5343,6 +5516,31 @@ func (sh *strictHandler) WorkerGet(ctx echo.Context, worker openapi_types.UUID) return nil } +// WorkflowDelete operation middleware +func (sh *strictHandler) WorkflowDelete(ctx echo.Context, workflow openapi_types.UUID) error { + var request WorkflowDeleteRequestObject + + request.Workflow = workflow + + handler := func(ctx echo.Context, request interface{}) (interface{}, error) { + return sh.ssi.WorkflowDelete(ctx, request.(WorkflowDeleteRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "WorkflowDelete") + } + + response, err := handler(ctx, request) + + if err != nil { + return err + } else if validResponse, ok := response.(WorkflowDeleteResponseObject); ok { + return validResponse.VisitWorkflowDeleteResponse(ctx.Response()) + } else if response != nil { + return fmt.Errorf("Unexpected response type: %T", response) + } + return nil +} + // WorkflowGet operation middleware func (sh *strictHandler) WorkflowGet(ctx echo.Context, workflow openapi_types.UUID) error { var request WorkflowGetRequestObject @@ -5486,116 +5684,117 @@ func (sh *strictHandler) WorkflowVersionGetDefinition(ctx echo.Context, workflow // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+x9WXPbuJb/V2Hx/3+YqZIs20n37fGbE7tzfa/jpGynUzNdrhREQhJiimADoB1PSt99", - "CitBEuCiLVJHT1FMLAcHv7Pg4AD4HkZ4nuEUpoyGZ99DGs3gHIif5x+vLgnBhP/OCM4gYQiKLxGOIf83", - "hjQiKGMIp+FZCIIopwzPg38CFs0gCyCvHYjCgxB+A/MsgeHZyevj40E4wWQOWHgW5ihlv74OByF7yWB4", - "FqKUwSkk4WJQbr7em/X/YIJJwGaIyj7t7sLzouATVDTNIaVgCoteKSMonYpOcUS/JCh9dHXJ/x4wHLAZ", - "DGIc5XOYMuAgYBCgSYBYAL8hymiJnClis3x8FOH5aCb5NIzhk/7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FVn", + "p2Yo7+ECWZXC3CD7FJyopvZ/1gpwd6f9/SGbRXufaBmfyOZgNyQJnPI5IG3rVVmCtirTtd6zzzvQZGzT", + "wkIzbx/D34klhoZQt7pW2bMyLw6SkAxXhyKWGbeBmayyjdYcMtHF7qZ3L7G9umXytDV53T3SugcaOg2A", + "y7wTk/oZcP2OneEZlHwSfgOPlW7QnkS5URF43RHxsO+iMQTuTwf94DfpFFgtxCyTwiju4Ak51hAkCT2s", + "wPaJweozbpZMtdlbA3eWzfIQ77AJwxRlDwdyo70l3IKyhwhEslhEYI4pYljeUd/yTrMmVQViUPagno7e", + "JUFZvbdTMuLGcDL01HvqmYmNHoIPFnJOrZLwJsV7M/qDzaiQaheS1qRqGEHTaVsk4k4WUFe6LnWsMPx2", + "121QMO2JuY+QUISzw+hyIlxgWnB8wGQgz7oABinThSJEowlk4xlMfNm7qmS89fpRwcCa1T53gtSOqG1e", + "K/Z9sX5/VnKblKLWQR2nNLtuG+ihFpVc0tBT1lrig1TiH7LwDnknfweduGYNoyZ12eMMetB7XbMFb+s3", + "ZmVtyy+tZ4YJnKAM6eTQPiqnrNlX+5yXfe710N9MD1lz+zKNZOFrr5y2UTnZE7S8nqpvfI8gIJCYje+B", + "cysckketLwqSxqdxvLhf/F8AAAD//6EeTj8sAwEA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/api/v1/server/oas/transformers/workflow_run.go b/api/v1/server/oas/transformers/workflow_run.go index a3b63251e..5a5839edc 100644 --- a/api/v1/server/oas/transformers/workflow_run.go +++ b/api/v1/server/oas/transformers/workflow_run.go @@ -212,10 +212,6 @@ func ToStepRun(stepRun *db.StepRunModel) (*gen.StepRun, error) { res.Output = repository.StringPtr(string(json.RawMessage(outputData))) } - if inputSchema, ok := stepRun.InputSchema(); ok { - res.InputSchema = repository.StringPtr(string(json.RawMessage(inputSchema))) - } - if jobRun := stepRun.RelationsStepRun.JobRun; jobRun != nil { var err error diff --git a/frontend/app/src/components/ui/json-form.tsx b/frontend/app/src/components/ui/json-form.tsx index fab4510ab..404444eab 100644 --- a/frontend/app/src/components/ui/json-form.tsx +++ b/frontend/app/src/components/ui/json-form.tsx @@ -15,7 +15,9 @@ import { DynamicSizeInputTemplate } from './form-inputs/dynamic-size-input-templ import { createContext, useRef } from 'react'; type JSONPrimitive = string | number | boolean | null | Array; -type JSONType = { [key: string]: JSONType | JSONPrimitive | Array }; +export type JSONType = { + [key: string]: JSONType | JSONPrimitive | Array; +}; export const DEFAULT_COLLAPSED = ['advanced', 'user data']; diff --git a/frontend/app/src/lib/api/generated/Api.ts b/frontend/app/src/lib/api/generated/Api.ts index d00de6e30..d1e532f18 100644 --- a/frontend/app/src/lib/api/generated/Api.ts +++ b/frontend/app/src/lib/api/generated/Api.ts @@ -663,6 +663,22 @@ export class Api extends HttpClient + this.request({ + path: `/api/v1/workflows/${workflow}`, + method: "DELETE", + secure: true, + ...params, + }); /** * @description Get a workflow version for a tenant * @@ -978,6 +994,23 @@ export class Api extends HttpClient + this.request({ + path: `/api/v1/tenants/${tenant}/step-runs/${stepRun}/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); /** * @description Get all workers for a tenant * diff --git a/frontend/app/src/lib/api/generated/data-contracts.ts b/frontend/app/src/lib/api/generated/data-contracts.ts index 909506c05..a59b986dd 100644 --- a/frontend/app/src/lib/api/generated/data-contracts.ts +++ b/frontend/app/src/lib/api/generated/data-contracts.ts @@ -548,7 +548,6 @@ export interface StepRun { cancelledAtEpoch?: number; cancelledReason?: string; cancelledError?: string; - inputSchema?: string; } export interface WorkerList { diff --git a/frontend/app/src/lib/api/queries.ts b/frontend/app/src/lib/api/queries.ts index 2e879d730..5f95e6973 100644 --- a/frontend/app/src/lib/api/queries.ts +++ b/frontend/app/src/lib/api/queries.ts @@ -109,6 +109,10 @@ export const queries = createQueryKeyStore({ queryKey: ['log-lines:list', stepRun], queryFn: async () => (await api.logLineList(stepRun, query)).data, }), + getSchema: (tenant: string, stepRun: string) => ({ + queryKey: ['step-run:get:schema', stepRun], + queryFn: async () => (await api.stepRunGetSchema(tenant, stepRun)).data, + }), }, events: { list: (tenant: string, query: ListEventQuery) => ({ diff --git a/frontend/app/src/pages/main/workflow-runs/$run/components/step-run-inputs.tsx b/frontend/app/src/pages/main/workflow-runs/$run/components/step-run-inputs.tsx index f5ba16c43..99b246996 100644 --- a/frontend/app/src/pages/main/workflow-runs/$run/components/step-run-inputs.tsx +++ b/frontend/app/src/pages/main/workflow-runs/$run/components/step-run-inputs.tsx @@ -1,9 +1,9 @@ import { CodeEditor } from '@/components/ui/code-editor'; -import { JsonForm } from '@/components/ui/json-form'; +import { JSONType, JsonForm } from '@/components/ui/json-form'; export interface StepRunOutputProps { input: string; - schema: string; + schema: object; setInput: React.Dispatch>; disabled: boolean; handleOnPlay: () => void; @@ -22,11 +22,11 @@ export const StepRunInputs: React.FC = ({ <> {mode === 'form' && (
- {schema === '' ? ( + {!schema ? ( <>No Schema ) : ( { + if (stepRun?.status === StepRunStatus.RUNNING) { + return 1000; + } + + return 5000; + }, + }); + const stepRunDiffQuery = useQuery({ ...queries.stepRuns.getDiff(stepRun?.metadata.id || ''), enabled: !!stepRun, @@ -347,7 +362,7 @@ export function StepRunPlayground({
{stepInput && ( object: + """Get step run schema + + Get the schema for a step run + + :param tenant: The tenant id (required) + :type tenant: str + :param step_run: The step run id (required) + :type step_run: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._step_run_get_schema_serialize( + tenant=tenant, + step_run=step_run, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "APIErrors", + '403': "APIErrors", + '404': "APIErrors", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def step_run_get_schema_with_http_info( + self, + tenant: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The tenant id")], + step_run: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The step run id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Get step run schema + + Get the schema for a step run + + :param tenant: The tenant id (required) + :type tenant: str + :param step_run: The step run id (required) + :type step_run: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._step_run_get_schema_serialize( + tenant=tenant, + step_run=step_run, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "APIErrors", + '403': "APIErrors", + '404': "APIErrors", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def step_run_get_schema_without_preload_content( + self, + tenant: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The tenant id")], + step_run: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The step run id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get step run schema + + Get the schema for a step run + + :param tenant: The tenant id (required) + :type tenant: str + :param step_run: The step run id (required) + :type step_run: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._step_run_get_schema_serialize( + tenant=tenant, + step_run=step_run, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "APIErrors", + '403': "APIErrors", + '404': "APIErrors", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _step_run_get_schema_serialize( + self, + tenant, + step_run, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if tenant is not None: + _path_params['tenant'] = tenant + if step_run is not None: + _path_params['step-run'] = step_run + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'cookieAuth', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/tenants/{tenant}/step-runs/{step-run}/schema', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def step_run_update_rerun( self, diff --git a/python-sdk/hatchet_sdk/clients/rest/api/workflow_api.py b/python-sdk/hatchet_sdk/clients/rest/api/workflow_api.py index 7d2f7fce8..d8b424e94 100644 --- a/python-sdk/hatchet_sdk/clients/rest/api/workflow_api.py +++ b/python-sdk/hatchet_sdk/clients/rest/api/workflow_api.py @@ -613,6 +613,274 @@ class WorkflowApi: + @validate_call + def workflow_delete( + self, + workflow: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The workflow id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete workflow + + Delete a workflow for a tenant + + :param workflow: The workflow id (required) + :type workflow: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._workflow_delete_serialize( + workflow=workflow, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "APIErrors", + '403': "APIErrors", + '404': "APIErrors", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def workflow_delete_with_http_info( + self, + workflow: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The workflow id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete workflow + + Delete a workflow for a tenant + + :param workflow: The workflow id (required) + :type workflow: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._workflow_delete_serialize( + workflow=workflow, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "APIErrors", + '403': "APIErrors", + '404': "APIErrors", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def workflow_delete_without_preload_content( + self, + workflow: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The workflow id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete workflow + + Delete a workflow for a tenant + + :param workflow: The workflow id (required) + :type workflow: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._workflow_delete_serialize( + workflow=workflow, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "APIErrors", + '403': "APIErrors", + '404': "APIErrors", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _workflow_delete_serialize( + self, + workflow, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if workflow is not None: + _path_params['workflow'] = workflow + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'cookieAuth', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/v1/workflows/{workflow}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def workflow_get( self, diff --git a/python-sdk/hatchet_sdk/clients/rest/models/step_run.py b/python-sdk/hatchet_sdk/clients/rest/models/step_run.py index dd539bfa2..669fdd059 100644 --- a/python-sdk/hatchet_sdk/clients/rest/models/step_run.py +++ b/python-sdk/hatchet_sdk/clients/rest/models/step_run.py @@ -55,8 +55,7 @@ class StepRun(BaseModel): cancelled_at_epoch: Optional[StrictInt] = Field(default=None, alias="cancelledAtEpoch") cancelled_reason: Optional[StrictStr] = Field(default=None, alias="cancelledReason") cancelled_error: Optional[StrictStr] = Field(default=None, alias="cancelledError") - input_schema: Optional[StrictStr] = Field(default=None, alias="inputSchema") - __properties: ClassVar[List[str]] = ["metadata", "tenantId", "jobRunId", "jobRun", "stepId", "step", "children", "parents", "workerId", "input", "output", "status", "requeueAfter", "result", "error", "startedAt", "startedAtEpoch", "finishedAt", "finishedAtEpoch", "timeoutAt", "timeoutAtEpoch", "cancelledAt", "cancelledAtEpoch", "cancelledReason", "cancelledError", "inputSchema"] + __properties: ClassVar[List[str]] = ["metadata", "tenantId", "jobRunId", "jobRun", "stepId", "step", "children", "parents", "workerId", "input", "output", "status", "requeueAfter", "result", "error", "startedAt", "startedAtEpoch", "finishedAt", "finishedAtEpoch", "timeoutAt", "timeoutAtEpoch", "cancelledAt", "cancelledAtEpoch", "cancelledReason", "cancelledError"] model_config = { "populate_by_name": True, @@ -142,8 +141,7 @@ class StepRun(BaseModel): "cancelledAt": obj.get("cancelledAt"), "cancelledAtEpoch": obj.get("cancelledAtEpoch"), "cancelledReason": obj.get("cancelledReason"), - "cancelledError": obj.get("cancelledError"), - "inputSchema": obj.get("inputSchema") + "cancelledError": obj.get("cancelledError") }) return _obj diff --git a/typescript-sdk/src/clients/rest/generated/Api.ts b/typescript-sdk/src/clients/rest/generated/Api.ts index c3af5c9b5..274d69916 100644 --- a/typescript-sdk/src/clients/rest/generated/Api.ts +++ b/typescript-sdk/src/clients/rest/generated/Api.ts @@ -667,6 +667,22 @@ export class Api extends HttpClient + this.request({ + path: `/api/v1/workflows/${workflow}`, + method: 'DELETE', + secure: true, + ...params, + }); /** * @description Get a workflow version for a tenant * @@ -995,6 +1011,23 @@ export class Api extends HttpClient + this.request({ + path: `/api/v1/tenants/${tenant}/step-runs/${stepRun}/schema`, + method: 'GET', + secure: true, + format: 'json', + ...params, + }); /** * @description Get all workers for a tenant * diff --git a/typescript-sdk/src/clients/rest/generated/data-contracts.ts b/typescript-sdk/src/clients/rest/generated/data-contracts.ts index a1cefbce6..d81d5b39b 100644 --- a/typescript-sdk/src/clients/rest/generated/data-contracts.ts +++ b/typescript-sdk/src/clients/rest/generated/data-contracts.ts @@ -548,7 +548,6 @@ export interface StepRun { cancelledAtEpoch?: number; cancelledReason?: string; cancelledError?: string; - inputSchema?: string; } export interface WorkerList {