Commit Graph

50 Commits

Author SHA1 Message Date
Gabe Ruttner
ca68eee45c feat(api): posthog telemetry (#374)
* feat: add posthog dep

* feat: posthog analytics

* feat: user events

* fix: nil tenant

* feat: tenant ident

* chore: linting

* Update pkg/analytics/posthog/posthog.go

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

* fix: typo

---------

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
2024-04-12 06:16:14 -07:00
abelanger5
f16a9cd0dc feat: add github sso to dashboard (#373) 2024-04-11 15:32:12 -04:00
Luca Steeb
a5a2629674 chore(webhookutils): remove unused file url_param.go & chi dep (#353) 2024-04-11 14:37:40 +07:00
abelanger5
e0d363e796 chore: intercept grpc errors and don't send internal to client (#370) 2024-04-10 19:03:18 -04:00
Luca Steeb
3c112d9df8 fix(workflow): remove workflow timeout in favor of step timeout (#366) 2024-04-10 23:53:00 +07:00
abelanger5
334ce758ec feat: queued metrics, along with bug fixes for round robin queueing (#340) 2024-04-04 17:45:10 -04:00
Gabe Ruttner
0da379e423 feat(dashboard): improve dashboard settings for user and tokens (#275)
* feat: expires at as Date

* wip: change passwords

* feat: user can change their password

* chore: cleanup

* chore: linting

* chore: fix build issue

* fix: protoc version

* chore: resolve feedback

* fix: ref

* fix: password inputs

* chore: update generated

* fix: update respository

* feat: only show change password if user has password

* fix: linting

* fix: validation string

* chore: regen api

---------

Co-authored-by: gabriel ruttner <gabe@hatchet.run>
2024-04-02 12:50:20 -04: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
5066547ce6 feat: cancel in progress (#325)
* chore: bad project path

* fix: remove tickerId for replay

* feat: cancel from request

* feat: cancel button in UI

* chore: rm comment

* fix: build error

* chore: reason case

* chore: reason string

* fix: linting

---------

Co-authored-by: gabriel ruttner <gabe@hatchet.run>
2024-04-02 01:16:27 +00: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
cdf203dc3e feat: new listen strategy with worker-side heartbeats (#308) 2024-03-31 22:45:10 -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
abelanger5
092f54c64f refactor: separate api and engine repositories, change ticker logic (#281)
* refactor: separate api and engine repositories, change ticker logic

* fix: nil error blocks

* fix: run migration on load test

* fix: generate db package in load test

* fix: test.yml

* fix: add pnpm to load test

* fix: don't lock CTEs with columns that don't get updated

* fix: update heartbeat for worker every 4 seconds, not 5

* chore: remove dead code

* chore: update python sdk

* chore: add back telemetry attributes
2024-03-21 14:10:34 -04:00
abelanger5
65224753c1 fix(go-sdk): support tls strategy of none, with docs (#269)
* fix(go-sdk): support tls strategy of none, with docs

* chore: errorf -> sprintf in examples

* Apply suggestions from code review

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

* fix: remove time from example

---------

Co-authored-by: Luca Steeb <contact@luca-steeb.com>
2024-03-18 14:02:53 -04:00
abelanger5
105aa08f3f chore: add sentry support to engine (#237)
* chore: add sentry support to engine

* chore: address PR comments
2024-03-06 11:50:49 -05: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
Alexander Belanger
16d67b3818 Merge branch 'main' into feat/playground 2024-02-16 12:52:15 -05:00
Luca Steeb
00111d823c test(load): add load tests CLI & e2e tests (#157) 2024-02-16 23:47:34 +07:00
abelanger5
3743746657 feat: github app integration (#163)
* feat: github app integration

* chore: proto

* fix: migrate instead of push

* fix: db migrate -> migrate

* fix: migrate again

* remove skip-generate

* add back generate

* setup pnpm
2024-02-13 21:34:16 -05:00
abelanger5
73adb7791e feat: custom claims for setting grpc/server addr in token (#150) 2024-02-05 00:18:19 -05:00
abelanger5
82d7995343 feat: manual triggers and give clients a hook into step run events (#141)
* feat: pubsub for clients, more qol stuff

* fix: generate sqlc files

* chore: linting and comments
2024-02-02 12:52:34 -05: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
abelanger5
78685d0098 feat(security): multiple encryption options, API tokens, easier setup (#125)
* (wip) encryption

* feat: api tokens

* chore: add api token generation command

* fix: e2e tests

* chore: set timeout for e2e job

* fix: e2e tests, remove client-side certs

* chore: address PR review comments

* fix: token tests

* chore: address review comments and fix tests
2024-01-26 15:38:36 -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
abelanger5
52fde1e704 feat: dag-style execution (#108)
* feat: dag-style execution

* docs: update to reflect new context

* ensure no cycles

* remove example cycle

* linting

* lint and small fixes

* update deferred rollback

* last rollback handling

* unset max issues

* fix requeue edge case
2024-01-16 11:31:24 -05:00
Luca Steeb
0ad77d50cb chore(lint): run golangci-lint --fix (#105) 2024-01-16 01:34:07 +07:00
abelanger5
752d5b0ab7 feat: support passing inputs to scheduled workflows (#104)
* fix: usage of RegisterAction

* make registered actions callable

* chore: update yaml example

* docs: register action documented

* feat: support input to scheduled workflows

* add worker

* add client

* docs: add input to schedule workflow

* chore: generate with updated protoc

* chore: sqlc generate
2024-01-12 00:27:34 -05:00
abelanger5
1f7baacb94 Fix usage of RegisterAction and update docs (#103)
* fix: usage of RegisterAction

* make registered actions callable

* chore: update yaml example

* docs: register action documented
2024-01-11 18:42:20 -05:00
abelanger5
4d03592aec chore: telemetry improvements (#101)
* fix: simple example

* chore: telemetry improvements

- Adds opentelemetry integration for the engine
- Adds standard logger with json and more readable output formats

* remove env from nodemon config files
2024-01-11 13:09:06 -05:00
abelanger5
62445dc37f feat: support one-time scheduled workflows (#84)
* feat: support one-time scheduled workflows

* refactor: move schedule out of workflow trigger def

* docs: add scheduling workflows section

* docs: update creating workflow

* only cancel schedules that are in the future
2024-01-08 10:03:32 -05:00
abelanger5
7d1cf5400f feat: add middleware to worker and services (#82)
* feat: add middleware support

* docs: add middleware to docs

* chore: remove commented code

* address review comments
2024-01-05 08:35:19 -05:00
abelanger5
65c165caf6 fix: slack example and rendering bug (#79) 2024-01-04 08:28:49 -05:00
abelanger5
ff30027ae7 feat: update go-sdk workflow syntax to make it less verbose (#78)
* feat: update go-sdk workflow syntax to make it less verbose

* docs: make triggers and definitions more clear
2024-01-03 17:14:12 -05:00
abelanger5
76d38d1af9 fix: allow rendering step runs with - in name (fixes #69) (#74)
* fix: allow rendering step runs with - in name (fixes #69)

* remove debug lines

* include worker fix
2024-01-03 14:48:18 -05:00
abelanger5
b069347851 fix: check duplicate functions correctly (#66) 2024-01-03 13:49:14 -05:00
abelanger5
dca151623c chore: remove slack dependency on datautils (#65) 2024-01-03 13:17:49 -05:00
abelanger5
c7a4c9045a fix: go-sdk improvements and set default timeouts (#64) 2024-01-03 13:13:37 -05:00
abelanger5
49693a5ad6 fix: duplicate workflows showing up in workflow list (#59)
* fix: duplicate workflows showing up in workflow list

* update formatting

* fix: action map should have proper action id for fn
2024-01-03 09:20:21 -05:00
abelanger5
bf16ba3d30 feat: better support for workflow versions (#55) 2024-01-02 16:15:58 -05:00
abelanger5
2e8712872a fix: improve go-sdk options and fix fn name detection (#51)
* fix: improve detection of fn name

* fix: support multiple events and crons

* feat: support single functions in go-sdk
2024-01-02 14:04:12 -05:00
abelanger5
373b9f4456 feat: add sentry integration to workers (#46)
* feat: add sentry integration to worker

* docs: add sentry alerter docs for worker
2024-01-02 09:56:15 -05:00
abelanger5
5937b9fd98 feat(go-sdk): add ability to create workflows from the Go SDK more easily, quickstart improvements (#30)
* feat: add initial docs site

* feat: allow workflows to be defined from go sdk

* fix release action

* chore: remove server dependencies from client

* fix: use correct certificate for server

* chore: add port and bind address to grpc config

* fix: add env for grpc config

* fix: nil pointer when output is null

* chore: support variation in output args

* fix unresolve merge conflict

* fix: quickstart improvements

* temp remove database url

* fix: action id not required for event

* fix: actionid validation for events

* Remove deleted files
2024-01-02 09:02:53 -05:00
abelanger5
4ca785ba61 feat: add scheduling timeout (non-configurable) (#24) 2023-12-27 14:40:24 -05:00
Alexander Belanger
366c79441d first commit 2023-12-15 13:08:04 -05:00