Commit Graph

69 Commits

Author SHA1 Message Date
abelanger5
1f2096313d feat: v1 engine (#1318) 2025-03-11 14:57:13 -04:00
Matt Kaye
9efd56c7de Feat: Propagate Error Through Context (#1193)
* feat: add query to fetch upstream errors from db

* fix: return many

* feat: propagate errors through `input`

* fix: implement the method to get the errors out

* fix: query cleanup

* feat: rename errors

* fix: col names

* fix: key name in the json

* feat: add method to context to get failed step errors

* fix: add 👀

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>

* feat: add error log if not errors

* fix: logger

* fix: simplify query

---------

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
2025-01-17 21:49:13 -05:00
Gabe Ruttner
cc0a8db4fd feat: expose stepId on context (#1169)
* feat: expose stepId on context

* fix: test context
2025-01-08 16:12:25 -05:00
abelanger5
75cd8e6795 fix: memory leak in go-sdk (#1168) 2025-01-08 14:41:17 -05:00
Gabe Ruttner
e92146816f fix: webhook workers on rebalance (#1162)
* fix: log ui

* fix: partition handling and unregister

* fix: concurrent cleanup

* feat: op pool

* fix: run or continue partition id

* fix: return false out of check
2025-01-07 10:54:15 -08:00
abelanger5
94d14336aa feat(go-sdk): blocking worker (#1106) 2024-12-12 20:42:13 -05:00
abelanger5
3d616c42b1 feat(go-sdk): expose user data (#1107) 2024-12-12 20:41:37 -05:00
abelanger5
197bdd1f88 feat: exponential backoff (#1062)
* initial migration

* feat: exp backoff, fix linting

* fix utc issue and cleanup
2024-11-21 13:39:02 -05:00
Gabe Ruttner
3850964a98 feat: initial doc pages (#1020)
* generate initial cloud client

* feat: initial doc pages

* feat: cloud register id, action filtering

* feat:cloud register

* fix: env var

* chore:lint

---------

Co-authored-by: Alexander Belanger <alexander@hatchet.run>
2024-11-08 07:46:43 -08:00
abelanger5
19e151e29a fix: RunWorkflow and SpawnWorkflow should respond with consistent APIs (#965) 2024-10-15 11:09:58 -04:00
Sean Reilly
29721cd1f0 Feat bulk workflows (#940)
Adds support for inserting workflows in bulk via the API and an optional buffered insert on the engine.
2024-10-14 15:35:29 -04:00
Gabe Ruttner
e046566db8 fix: go sdk improvements (#952)
* fix: default service

* fix: lowercase

* fix: runId in alert

* fix: correct file
2024-10-08 13:47:03 -04:00
Gabe Ruttner
5ee9560c56 feat: expose addl meta on ctx (#938) 2024-10-03 11:02:15 -07:00
abelanger5
a1a10b4073 feat: dynamic rate limits (#904)
* wip: step run expressions on rate limits

* feat: dynamic rate limits

* chore: v0.47.0

* chore: address changes from PR review

* fix: improved error handling

* address pr review

* better error messages for step run cels, remove debug logs

* fix: hash

---------

Co-authored-by: gabriel ruttner <gabriel.ruttner@gmail.com>
2024-09-26 22:00:34 +00:00
abelanger5
d23e5d9963 feat: expression-based concurrency keys (#889)
* feat: expression-based concurrency keys

* fix: build

* fix: typos

* fix: gen

* fix: migration

* fix: remove print statements

* fix: reassignment bugs, retries on closed transport, pr review
2024-09-19 10:32:22 -04:00
Steinway Wu
44d03af852 fix: propagating additional metadata for child workflows (#882)
* fix: propagating additional metadata for child workflows

* add unit test
2024-09-19 13:28:46 +00:00
Gabe Ruttner
53be615d5f Enhancement webhook usability (#807)
* feat: secret copier

* feat: improved form

* fix: quotes

* wip: improved flow

* feat: health check logging

* fix: page design

* fix: hard delete, no upsert

* fix: reset modal state

* fix: empty text

* fix: worker state

* fix: update only token

* fix: dont delete name

* fix: logs component

* fix: sort order

* chore: build

* fix: webhook worker cleanup

* chore: squash migrations

* Update api-contracts/openapi/paths/webhook-worker/webhook-worker.yaml

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>

* chore: rename

* fix: wrong query

---------

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
2024-08-23 10:09:09 -04:00
Gabe Ruttner
9bea55438a Fix webhook healthcheck race (#797)
* fix: race

* fix: partition no rows

* chore: move to workers tab

* feat: redirect empty worker path to all

* chore: add worker type and webhook id

* fix: upsert webhook worker

* fix: update by webhookId

* fix: only stub on create

* feat: url on worker

* chore: migration version

* fix: move

* fix: upsert

* fix: upert

* chore: fix migration

* fix: migrations

* chore: generate
2024-08-21 19:23:24 +00:00
Viktor Szépe
0948598749 Fix typos (#775) 2024-08-10 10:58:33 +00:00
abelanger5
9efd9368fd feat: deduplicated enqueue error and additional context methods (#747)
* feat: additional context fields and dedupe error

* fix: case on error properly
2024-07-26 18:32:56 +00:00
Gabe Ruttner
fd947cb5bc feat: go worker assignment (#741)
* feat: create worker with label

* feat: worker context

* feat: dynamic labels

* feat: affinity

* fix: ptr

* fix: nil labels

* feat: sticky dag

* feat: sticky docs

* feat: sticky children

* chore: lint

* fix: tests

* fix: possibly nil workerId

* chore: cleanup unneeded pointers
2024-07-26 10:19:11 -07:00
Luca Steeb
62e02495c9 fix(webhooks): remove unused workflows field (#665) 2024-07-02 15:24:23 +01:00
abelanger5
8a991c1cb0 fix(go-sdk): add schedule timeout (#673)
* fix(go-sdk): add schedule timeout

* chore: lint
2024-06-30 11:38:39 -04:00
Luca Steeb
b88989d825 fix(webhooks): send ActionPayload as string (#657) 2024-06-26 23:20:50 +00:00
Luca Steeb
a51681ddc6 fix(webhooks): use PUT for healthcheck (#644) 2024-06-26 10:39:11 -04:00
Luca Steeb
5ffa3d1839 fix(worker): deprecate On in favor of RegisterWorkflow (#627) 2024-06-25 22:26:04 +00:00
Luca Steeb
1490d88954 feat: webhook workers (#542)
Adds serverless support via the concept of webhook workers. Allows any webhook to be registered as a serverless endpoint for executing a step.
2024-06-25 17:06:43 -04:00
abelanger5
7c3ddfca32 feat: api server extensions (#614)
* feat: allow extending the api server

* chore: remove internal packages to pkg

* chore: update db_gen.go

* fix: expose auth

* fix: move logger to pkg

* fix: don't generate gitignore for prisma client

* fix: allow extensions to register their own api spec

* feat: expose pool on server config

* fix: nil pointer exception on empty opts

* fix: run.go file
2024-06-19 09:36:13 -04:00
Gabe Ruttner
e09ee98df5 feat: expose retry count (#524)
* feat: expose retry count

* feat: expose retry count go

* docs: accessing retry count

* fix: import

* fix: tests

* fix: docs formatting

---------

Co-authored-by: Alexander Belanger <alexander@hatchet.run>
Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
2024-06-07 15:27:38 +00:00
abelanger5
5f93a41e8b fix(go-sdk): propagate namespace to child workflows (#562) 2024-06-06 12:36:50 -04:00
Gabe Ruttner
e6617e1381 feat: refresh timeout (#495)
* feat: show timeout on step run

* feat: refresh timeout

* fix: increment timeout from last time

* feat: add step run event for timeout refresh

* chore: generate

* feat: add refreshing timeouts docs section

* chore: linting

* feat: go client

* chore: generate

* chore: generate

* fix: test context

* chore: generate

* fix: rm txn

* fix: validator

* chore: lint

---------

Co-authored-by: Alexander Belanger <alexander@hatchet.run>
2024-05-16 12:23:36 -04:00
Gabe Ruttner
48d06b931a feat: client releasable slots (#476)
* feat: add release slot proto

* feat: add semaphore release state and methods

* feat: go sdk and example

* docs: manual slot release

* chore: linting

* fix: broken test

* fix: unlink step run on manual release

* feat: release slot event

* fix: test

* fix: revert e2e test changes

* chore: remove debug line

* fix: place step run query in same tx

* fix: change migration release version

---------

Co-authored-by: Alexander Belanger <belanger@sas.upenn.edu>
2024-05-14 15:22:46 -04:00
abelanger5
7543a0c2a5 add jobs which always run on failure (#445)
* (wip) prisma schema

* feat: on-failure steps

* chore: address changes from PR review

* chore: bump migration number
2024-05-06 15:39:22 -04:00
abelanger5
671a7e1474 feat(go-sdk): capture panics and send to alerter (#403) 2024-04-22 05:35:40 -04:00
abelanger5
4ce1dd8632 feat: multi-workflow runs listener on a single endpoint
* new api-contract for workflow run events

* feat: initial implementation for new subscribe listener

* fix: sync issues and send workflow runs immediately

* refactor: add context to all engine db queries, fix deadlocking query

* fix: use new ctx for deleting dispatcher and ticker

* add cancellation reasons

* fix: docs linting

---------

Co-authored-by: gabriel ruttner <gabriel.ruttner@gmail.com>
2024-04-18 20:55:11 -04:00
Gabe Ruttner
f43f32283c feat(py/go): namespaces (#354)
* feat: namespaced python

* wip: namespaced go

* fix: service name

* fix: tests

* feat: client WithNamespace

* feat: namespace example

* feat: namespaced event triggers

* docs: namespace docs

* chore: linting

---------

Co-authored-by: gabriel ruttner <gabe@hatchet.run>
2024-04-15 11:26:05 -07:00
Luca Steeb
3c112d9df8 fix(workflow): remove workflow timeout in favor of step timeout (#366) 2024-04-10 23:53:00 +07:00
abelanger5
066b3c5b71 feat(engine): initial rate-limiting engine implementation (#324)
* feat(engine): initial rate-limiting engine implementation

* fixes and implement go sdk rate limiting
2024-04-02 10:53:03 -04:00
Gabe Ruttner
d8b6843dec feat: streaming events (#309)
* feat: add stream event model

* docs: how to work with db models

* feat: put stream event

* chore: rm comments

* feat: add stream resource type

* feat: enqueue stream event

* fix: contracts

* feat: protos

* chore: set properties correctly for typing

* fix: stream example

* chore: rm old example

* fix: async on

* fix: bytea type

* fix: worker

* feat: put stream data

* feat: stream type

* fix: correct queue

* feat: streaming payloads

* fix: cleanup

* fix: validation

* feat: example file streaming

* chore: rm unused query

* fix: tenant check and read only consumer

* fix: check tenant-steprun relation

* Update prisma/schema.prisma

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>

* chore: generate protos

* chore: rename migration

* release: 0.20.0

* feat(go-sdk): implement streaming in go

---------

Co-authored-by: gabriel ruttner <gabe@hatchet.run>
Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
2024-04-01 15:46:21 -04:00
abelanger5
7b7fbe3668 fix: update Requeue and Reassign logic to fix performance degradation when many events are queued (#310)
Logic for requeueing and reassigning did not limit the number of step runs to requeue, so when events accumulate with no worker present it causes memory to spike along with a very high query latency on the database. This commit limits the number of step runs returned in the requeue and reassign queries, and also properly locks step run rows for these queries so only a step run in a PENDING or PENDING_ASSIGNMENT state can be requeued.

It also improves performance of the `AssignStepRunToWorker` query and ensures that `maxRuns` on workers are always respected through the introduction of a `WorkerSemaphore` model. The value gets decremented when a step run is assigned and incremented when a step run is in a final state. 

Co-authored-by: Luca Steeb <contact@luca-steeb.com>

* Update controller.go

---------

Co-authored-by: steebchen <contact@luca-steeb.com>
2024-04-01 12:33:18 -04:00
abelanger5
77e5d2b77c feat(go-sdk): spawnWorkflow method and get up to speed with other sdks (#297)
* feat(go-sdk): spawnWorkflow method and get up to speed with other sdks

* fix: manual trigger example

* fix: linting errors

* fix: double serialization from go sdk

* fix: spawn workflow logic and procedural example

* test(e2e): add procedural test

* fix: panic in e2e test

* fix: e2e test preparation

* fix: api server url in test.yml

* fix: load test server url

* chore: make num children configurable

* address pr review
2024-03-29 14:07:39 -07:00
Luca Steeb
9b68115fb5 refactor: cleanup functions in api + worker (#192) 2024-03-02 00:37:02 +07:00
abelanger5
7709bcb175 fix(engine): requeue improvements (#200)
* fix: queue improvements

* fix: bugs

* fix: e2e tests

* fix: diff
2024-02-27 12:02:31 -05:00
abelanger5
6ea38a99f2 feat: support maxRuns parameter on workers (#195)
* feat: round robin queueing

* feat: configurable max runs per worker

* fix: address PR review

* docs for max runs and group round robin
2024-02-26 00:48:46 -05:00
abelanger5
2d625fec81 feat: round robin queueing (#194) 2024-02-26 00:16:40 -05:00
abelanger5
df3f540748 feat: add retries to the engine and SDKs (#171)
This PR adds support for retrying failed step runs against the engine and SDKs. This was tested up to 30 retries per step run, with both failure and success at the 30th step run. Each SDK now has a `retries` configurable param for steps when declaring a workflow.
2024-02-16 13:00:22 -05:00
Luca Steeb
00111d823c test(load): add load tests CLI & e2e tests (#157) 2024-02-16 23:47:34 +07:00
abelanger5
d63b66a837 feat: concurrency groups (#135)
* first pass at moving controllers around

* feat: concurrency limits for strategy CANCEL_IN_PROGRESS

* fix: linting

* chore: bump python sdk version
2024-01-30 00:00:28 -05:00
abelanger5
14a971bfd7 feat: improve versioning to use checksums (#129)
* feat: improve versioning to use checksums

* fix: remove json ignore for scheduled triggers

* update migration with random strings for checksum
2024-01-26 20:47:15 -05:00
Luca Steeb
c8f87599c7 chore: ignore or fix linter errors (#116)
* chore: ignore or fix linter errors

* chore: wrap up lint errors

* chore: sqlc generation

---------

Co-authored-by: Alexander Belanger <belanger@sas.upenn.edu>
2024-01-21 22:01:20 -05:00