Skip to content
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

feat: dynamic crons #1000

Merged
merged 56 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
524874b
wip: stub schedule page
grutt Oct 15, 2024
ee6fc35
wip: stub list
grutt Oct 15, 2024
1538f2d
merge
grutt Oct 15, 2024
b78bc42
Merge branch 'main' into feat--scheduled-improvements
grutt Oct 24, 2024
01e537c
fix: 2025 bug...
grutt Oct 24, 2024
2757bd9
feat: wip cron list
grutt Oct 24, 2024
ab0721d
feat: addl meta
grutt Oct 24, 2024
dbd9ed5
feat: expose metadata column
grutt Oct 24, 2024
ae8304f
feat: sort and created at
grutt Oct 24, 2024
1e0c80c
cron to recurring
grutt Oct 24, 2024
5ee9c1f
scheduled: with statuses
grutt Oct 24, 2024
de2e44c
fix: links
grutt Oct 24, 2024
e21aeeb
feat: expose schedule ids
grutt Oct 24, 2024
1756214
feat: delete run
grutt Oct 25, 2024
3cae252
fix: remove search
grutt Oct 25, 2024
48dc2f9
feat: filterable scheduled
grutt Oct 25, 2024
2eae6a0
fix: remove broken features
grutt Oct 25, 2024
37b71f9
chore: lint
grutt Oct 25, 2024
be51b3b
Merge branch 'main' into feat--scheduled-improvements
grutt Oct 28, 2024
4631397
rm metadata for now
grutt Oct 28, 2024
7dc03cc
chore: lint
grutt Oct 28, 2024
152452f
chore: recurring to cron job
grutt Oct 28, 2024
f79758f
fix: review comments
grutt Oct 29, 2024
f1b95da
Merge branch 'main' into feat--scheduled-improvements
grutt Oct 29, 2024
227b1c6
fix: populator
grutt Oct 29, 2024
e6c5091
wip cron changes
grutt Oct 30, 2024
a1f6d07
fix: ids are helpful
grutt Oct 30, 2024
258a448
Merge branch 'main' into feat--dynamic-crons
grutt Nov 1, 2024
d489d39
fix: populator
grutt Nov 1, 2024
459398b
wip
grutt Nov 4, 2024
ff01f64
wip: create crons, stub scheduled
grutt Nov 4, 2024
12aa0d4
wip: create schedule
grutt Nov 4, 2024
dd20790
wip add trigger buttons to all the pages
grutt Nov 4, 2024
3bd1b23
wip: reusable trigger form
grutt Nov 4, 2024
977369e
Merge branch 'main' into feat--dynamic-crons
grutt Nov 8, 2024
90fb1d0
Merge branch 'main' into feat--dynamic-crons
grutt Nov 8, 2024
7fc4e1e
fix: hash
grutt Nov 8, 2024
4929e0a
Merge branch 'main' into feat--dynamic-crons
grutt Nov 18, 2024
9efdf17
Merge branch 'main' into feat--dynamic-crons
grutt Nov 20, 2024
e972932
fixes: cron bugs
grutt Nov 20, 2024
0522910
fixes: cron sort
grutt Nov 21, 2024
e6fa7e7
fix: out of order migrations
abelanger5 Nov 21, 2024
7af4985
fix: add internalRetryCount
abelanger5 Nov 21, 2024
806c8a4
chore: hopefully good merge....
grutt Nov 21, 2024
26d1ca7
feat: api things survive version transitions
grutt Nov 21, 2024
3aa63ac
feat: table things
grutt Nov 21, 2024
0a3b6ab
feat: delete disabled for non api
grutt Nov 21, 2024
d7b03cf
feat: prevent delete non api
grutt Nov 21, 2024
09faf77
feat: filters
grutt Nov 21, 2024
0ac11d7
require cron name for api
grutt Nov 21, 2024
dd59709
default name
grutt Nov 21, 2024
b16435f
fix: migrations
grutt Nov 21, 2024
27c4e4b
Merge remote-tracking branch 'origin/main' into feat--dynamic-crons
abelanger5 Nov 21, 2024
6f6b5db
frontend improvements and migrations
abelanger5 Nov 21, 2024
e89f156
Merge branch 'feat--dynamic-crons' of github.com:hatchet-dev/hatchet …
abelanger5 Nov 21, 2024
62056cb
fix: pagination
grutt Nov 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ tasks:
recreate-db-from-scratch:
cmds:
- docker compose down
- docker volume rm hatchet_hatchet_postgres_data
- docker volume rm hatchet_hatchet_rabbitmq_data
- docker volume rm oss_hatchet_postgres_data
- docker volume rm oss_hatchet_rabbitmq_data
- docker compose up -d
- task: setup
- task: init-dev-env
Expand Down
4 changes: 4 additions & 0 deletions api-contracts/openapi/components/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ RerunStepRunRequest:
$ref: "./workflow_run.yaml#/RerunStepRunRequest"
TriggerWorkflowRunRequest:
$ref: "./workflow_run.yaml#/TriggerWorkflowRunRequest"
ScheduleWorkflowRunRequest:
$ref: "./workflow_run.yaml#/ScheduleWorkflowRunRequest"
CreateCronWorkflowTriggerRequest:
$ref: "./workflow_run.yaml#/CreateCronWorkflowTriggerRequest"
CreatePullRequestFromStepRun:
$ref: "./workflow_run.yaml#/CreatePullRequestFromStepRun"
GetStepRunDiffResponse:
Expand Down
55 changes: 55 additions & 0 deletions api-contracts/openapi/components/schemas/workflow_run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ScheduledWorkflowsOrderByField:
CronWorkflowsOrderByField:
type: string
enum:
- name
- createdAt

WorkflowRunOrderByDirection:
Expand Down Expand Up @@ -207,13 +208,23 @@ ScheduledWorkflows:
minLength: 36
maxLength: 36
format: uuid
method:
$ref: "#/ScheduledWorkflowsMethod"
required:
- metadata
- tenantId
- workflowVersionId
- workflowName
- workflowId
- triggerAt
- method


ScheduledWorkflowsMethod:
type: string
enum:
- DEFAULT
- API

ScheduledWorkflowsList:
type: object
Expand All @@ -225,6 +236,12 @@ ScheduledWorkflowsList:
pagination:
$ref: "./metadata.yaml#/PaginationResponse"

CronWorkflowsMethod:
type: string
enum:
- DEFAULT
- API

CronWorkflows:
type: object
properties:
Expand All @@ -240,19 +257,27 @@ CronWorkflows:
type: string
cron:
type: string
name:
type: string
input:
type: object
additionalProperties: true
additionalMetadata:
type: object
additionalProperties: true
enabled:
type: boolean
method:
$ref: "#/CronWorkflowsMethod"
required:
- metadata
- tenantId
- workflowVersionId
- workflowName
- workflowId
- cron
- enabled
- method

CronWorkflowsList:
type: object
Expand Down Expand Up @@ -636,6 +661,36 @@ TriggerWorkflowRunRequest:
required:
- input

CreateCronWorkflowTriggerRequest:
properties:
input:
type: object
additionalMetadata:
type: object
cronName:
type: string
cronExpression:
type: string
required:
- input
- additionalMetadata
- cronName
- cronExpression

ScheduleWorkflowRunRequest:
properties:
input:
type: object
additionalMetadata:
type: object
triggerAt:
type: string
format: date-time
required:
- input
- additionalMetadata
- triggerAt

CreatePullRequestFromStepRun:
properties:
branchName:
Expand Down
8 changes: 7 additions & 1 deletion api-contracts/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,18 @@ paths:
$ref: "./paths/event/event.yaml#/keys"
/api/v1/tenants/{tenant}/workflows:
$ref: "./paths/workflow/workflow.yaml#/withTenant"
/api/v1/tenants/{tenant}/workflows/{workflow}/scheduled:
$ref: "./paths/workflow/workflow.yaml#/scheduledCreate"
/api/v1/tenants/{tenant}/workflows/scheduled:
$ref: "./paths/workflow/workflow.yaml#/scheduledList"
/api/v1/tenants/{tenant}/workflows/scheduled/{scheduledId}:
/api/v1/tenants/{tenant}/workflows/scheduled/{scheduled-workflow-run}:
$ref: "./paths/workflow/workflow.yaml#/scheduled"
/api/v1/tenants/{tenant}/workflows/{workflow}/crons:
$ref: "./paths/workflow/workflow.yaml#/cronsCreate"
/api/v1/tenants/{tenant}/workflows/crons:
$ref: "./paths/workflow/workflow.yaml#/cronsList"
/api/v1/tenants/{tenant}/workflows/crons/{cron-workflow}:
$ref: "./paths/workflow/workflow.yaml#/crons"
/api/v1/tenants/{tenant}/workflows/cancel:
$ref: "./paths/workflow/workflow.yaml#/cancelWorkflowRuns"
/api/v1/workflows/{workflow}:
Expand Down
Loading
Loading