1299 Commits

Author SHA1 Message Date
Gabe Ruttner 0ec8f830b9 optimization: tenant metrics queries (#1571)
* exhaustive indexes

* fix migrations

* remove statemtn

* lint

* prune

* fix: indexes

* concurrent

* concurrent

* revert

* lint
v0.60.0
2025-04-18 10:46:37 -04:00
Gabe Ruttner 3cbbc9b9f1 fix: concurrent workflow version on put (#1570)
* fix: lock previous version before list

* patch migration

* transactional

* lint

* fix nil case
2025-04-18 10:38:12 -04:00
Matt Kaye 9cc60e9736 feat: fix cron validation using library (#1565)
Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
2025-04-18 10:36:44 -04:00
Gabe Ruttner 9d2b3abcf8 fix: key (#1572) 2025-04-18 10:36:31 -04:00
abelanger5 9aead7ab68 feat: global prometheus metrics (#1568)
* feat: global prometheus metrics

* configure prom with env vars, clean up metrics

* add histogram and docs

* update port
2025-04-17 15:11:38 -04:00
Matt Kaye ee0f6ad97d Debug: Priority Tests (#1548)
* debug: prio tests

* debug: try running against staging

* Revert "debug: try running against staging"

This reverts commit de7fcc922b731f2c10497eabd746f90971cdfa5b.

* fix: turn down concurrency run number
2025-04-17 13:55:40 -04:00
Gabe Ruttner 4dac71d234 docs--worker-config-options (#1535)
* docs--worker-config-options

* Update frontend/docs/pages/home/workers.mdx

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

* Update worker-configuration-options.mdx

* lint

---------

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
2025-04-16 05:02:08 -07:00
abelanger5 9761d770ca docs: concurrency cleanup (#1562) 2025-04-15 18:01:38 -04:00
abelanger5 ef6668a8c3 fix: go signature and docs (#1561)
* fix: go signature and docs

* Update examples/v1/workflows/concurrency-rr.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-15 17:31:48 -04:00
Matt Kaye 0823ae3316 Hatchet Python Blog Post (#1526)
* feat: initial pass at first parts of blog post

* feat: initial mkdocs setup

* feat: first pass at embedding mkdocs

* fix: config

* debug: paths

* fix: unwind docs hack

* feat: start working on mkdocs theme

* fix: paths

* feat: wrap up post

* fix: proof

* fix: doc links

* fix: rm docs

* fix: lint

* fix: lint

* fix: typos + tweak

* fix: tweaks

* fix: typo

* fix: cleanup
2025-04-15 17:21:31 -04:00
Matt Kaye 6c52c63f63 fix: one more possible null deref (#1560) v0.59.5 2025-04-15 14:57:30 -04:00
abelanger5 9a0c5ac63e hotfix: priority on cron workflow for v0 (#1558) v0.59.4 2025-04-15 14:47:48 -04:00
Matt Kaye 3ee5a1ef88 Hotfix: Handle EOF Properly (#1557)
* fix: handle EOF properly

* chore: version

* fix: debug logs

* fix: rm eof type
2025-04-15 13:53:13 -04:00
abelanger5 1dcb50c170 hotfix: priority on schedule workflow (#1556)
* hotfix: priority on schedule workflow

* fix: build
v0.59.3
2025-04-15 13:10:40 -04:00
abelanger5 65187c4037 hotfix: priority nil pointer (#1555) v0.59.2 2025-04-15 12:34:06 -04:00
Gabe Ruttner b752419ebc fix: empty billing context (#1553)
* fix: empty

* precommit
v0.59.1
2025-04-15 11:23:15 -04:00
abelanger5 22f6b19e97 chore: improve error on dispatcher (#1538) 2025-04-15 11:13:55 -04:00
Gabe Ruttner 75f522c872 Update issue templates 2025-04-15 05:28:44 -07:00
dependabot[bot] 09e07a2e56 chore(deps): bump google.golang.org/api from 0.228.0 to 0.229.0 (#1550)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.228.0 to 0.229.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.228.0...v0.229.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.229.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-15 05:09:03 +00:00
Gabe Ruttner e01e4738ac fix: namespace (#1549)
* fix: namespace

* not ready for this...

* improved
2025-04-14 15:57:19 -07:00
abelanger5 c6abd6b9d2 feat: multiple workflow concurrency keys (#1511)
* feat: multiple workflow concurrency keys

* [Python]: Allow multiple workflow-level concurrency keys (#1512)

* chore: generate

* feat: multi concurrency

* chore: version

* feat: example + test

* fix: expand tests

* Feat  ts multiple wf concurrency (#1522)

* feat: multiple concurrency

* release: 1.2.0

* fix: merge

* fix: concurrency defn

* fix: ts multiple concurrency backwards compat (#1531)

* fix

* gen

* chore: lint

---------

Co-authored-by: mrkaye97 <mrkaye97@gmail.com>

---------

Co-authored-by: Gabe Ruttner <gabriel.ruttner@gmail.com>

* chore: ver

* chore: gen

* chore: versions

* fix: manually rename migration

* fix: patch ver

---------

Co-authored-by: mrkaye97 <mrkaye97@gmail.com>
Co-authored-by: Gabe Ruttner <gabriel.ruttner@gmail.com>
v0.59.0
2025-04-14 17:29:17 -04:00
Kyle Smith 9f3addca82 fix: ensure release VERSION is properly set in lite builds (#1545) 2025-04-14 16:30:48 -04:00
Matt Kaye 80137736af Feat: Priority (#1513)
* feat: initial work wiring up priorities

* fix: add default to default prio in the db

* feat: wire priority through api on wf creation

* feat: extend python test

* feat: priority for scheduled workflows

* feat: wire priority through python api

* feat: more wiring priority through the api

* feat: I think it works?

* feat: e2e test for priority

* it works!

* feat: expand tests for default priorities

* feat: e2e scheduling test

* fix: skip broken test for now

* fix: lint

* feat: add priority columns to cron and schedule ref  tables

* feat: update inserts to include prio

* feat: wire up more apis

* feat: more wiring

* feat: wire up more rest api fields

* chore: cruft

* fix: more wiring

* fix: lint

* chore: gen + wire up priorities

* fix: retries

* fix: try changing fixture scope

* chore: bump version again

* feat: send priority with action payload

* fix: generate script

* Feat  priority ts (#1518)

* feat: initial work wiring up priorities

* fix: add default to default prio in the db

* feat: wire priority through api on wf creation

* feat: extend python test

* feat: priority for scheduled workflows

* feat: wire priority through python api

* feat: more wiring priority through the api

* feat: I think it works?

* feat: e2e test for priority

* it works!

* feat: expand tests for default priorities

* feat: e2e scheduling test

* chore: minor version for priority

* fix: skip broken test for now

* fix: lint

* feat: add priority columns to cron and schedule ref  tables

* feat: update inserts to include prio

* feat: wire up more apis

* feat: more wiring

* feat: wire up more rest api fields

* chore: cruft

* fix: more wiring

* fix: lint

* chore: gen + wire up priorities

* fix: increase timeout

* fix: retries

* fix: try changing fixture scope

* chore: generate

* fix: set schedule priority

* feat: priority

* fix: move priority to wf

* release: 1.2.0

* rm log

* fix: import

* fix: add priority to step

---------

Co-authored-by: mrkaye97 <mrkaye97@gmail.com>

* fix: add dummy runs to priority test to prevent race conditions

* fix: non-breaking field

* fix: gen

* feat: initial pass at docs

* feat: priority in go sdk

* feat: initial work on go example

* fix: doc examples

* fix: proofread

* chore: version

* feat: go sdk

* fix: lint

* fix: declarations and add back RunAsChild

* fix: child workflows

* fix: namespace

* fix: faster child workflows

* fix: sticky

* add back run as child

---------

Co-authored-by: Gabe Ruttner <gabriel.ruttner@gmail.com>
Co-authored-by: Alexander Belanger <alexander@hatchet.run>
2025-04-14 16:22:00 -04:00
Matt Kaye eee938e326 Fix: Unique readable data key errors (#1546)
* feat: export readable data key + dedupe better

* chore: ver
2025-04-14 14:45:30 -04:00
abelanger5 7190078b8d fix: remove fk constraint on crons (#1543) v0.58.11 2025-04-14 09:59:27 -04:00
Matt Kaye 90805ca763 Feat: Lifespans! (#1541)
* feat: implement lifespans

* feat: add psycopg test dep

* feat: lifespan script

* feat: examples and tests

* drive-by: add license

* drive-by: throw errors for sanity checks

* feat: docs

* feat: sync and async

* fix: docs

* fix: lint

* fix: small tweaks

* fix: rm unused

* fix: typed example

* fix: print
2025-04-14 08:56:39 -04:00
Gabe Ruttner cc014bdead fix: correct create type (#1539) 2025-04-11 14:25:58 -07:00
abelanger5 6813ab1c75 fix: streaming order improvements, go sdk stability (#1536)
* fix: streaming order improvements, go sdk stability

* fix: improve replay query
v0.58.10
2025-04-11 13:02:47 -04:00
Matt Kaye eb78fd1db6 fix: task output (#1519) 2025-04-11 10:22:41 -04:00
abelanger5 5ad3a4bfcf fix: increase PutWorkflowVersion timeout to 25 seconds (#1529) v0.58.9 2025-04-11 08:54:41 -04:00
dependabot[bot] 07453b22db chore(deps): bump golang.org/x/crypto from 0.36.0 to 0.37.0 (#1500)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.36.0 to 0.37.0.
- [Commits](https://github.com/golang/crypto/compare/v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-11 05:09:12 +00:00
dependabot[bot] 97286e5c5c chore(deps): bump golang.org/x/oauth2 from 0.28.0 to 0.29.0 (#1499)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.28.0 to 0.29.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-version: 0.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-11 05:09:03 +00:00
dependabot[bot] b7c758b9a7 chore(deps): bump github.com/getsentry/sentry-go from 0.31.1 to 0.32.0 (#1532)
Bumps [github.com/getsentry/sentry-go](https://github.com/getsentry/sentry-go) from 0.31.1 to 0.32.0.
- [Release notes](https://github.com/getsentry/sentry-go/releases)
- [Changelog](https://github.com/getsentry/sentry-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-go/compare/v0.31.1...v0.32.0)

---
updated-dependencies:
- dependency-name: github.com/getsentry/sentry-go
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-11 05:07:45 +00:00
gabriel ruttner 40ca36fe08 hotfix: doc corrections 2025-04-10 20:26:52 -04:00
Matt Kaye e4e57e7951 [Python]: Refactor: Remove validator registry (#1528)
* feat: remove validator registry!

* chore: version

* refactor: rename `WorkflowValidator` -> `TaskIOValidator`

* fix: rm unnecessary variable
2025-04-10 17:45:35 -04:00
Matt Kaye 7781200123 Hotfix: Pydantic validation of actionId (#1525)
* fix: pydantic validation of action

* chore: version
2025-04-10 12:25:39 -04:00
Gabe Ruttner 1ebd3a4ab9 fix: correct endpoint for run get (#1524) 2025-04-10 08:34:44 -07:00
Matt Kaye 993817b049 [Python] Single listener base class + bug fixes + refactors (#1470)
* fix: register durable steps and workflows separately

* chore: initial copy of pooled listener

* feat: initial generic impl

* feat: use pooled listener for wf run listener

* refactor: move listeners to subdir

* feat: refactor durable event listener

* fix: bug

* feat: share single pooled workflow listener and event listener everywhere

* cruft: rm hatchet fixture

* fix: rebase issue

* feat: remove asyncio api client in favor of sync one

* chore: minor version

* proposal: crazy hack idea to make the workflow run listener work

* fix: sleeps and error handling

* Revert "cruft: rm hatchet fixture"

This reverts commit b75f625e6ccec095e8c4e294d6727db166796411.

* fix: set timeout

* fix: rm pytest-timeout

* fix: rm retry

* fix: use v1 by default

* fix: try removing retry state

* fix: try using async client?

* fix: try running sequentially

* debug: loop

* debug: maybe it's this?

* fix: lint

* fix: re-remove unused fixtures

* fix: lazily create clients in admin client

* fix: default

* fix: lazily initialize dispatcher client

* fix: hint

* fix: no. way.

* feat: add back retries in ci

* fix: clients + imports

* fix: loop scope

* debug: try running skipped tests in ci again

* Revert "debug: try running skipped tests in ci again"

This reverts commit 8d9e18150e5207ee6051d8df8a6fe2a7504c722e.

* fix: rm duped code

* refactor: rename everything as `to_proto`

* refactor: removals of `namespace` being passed around

* fix: task output stupidity

* feat: add deprecation warning

* fix: remove more unused code

* feat: mix sync and async in dag example

* fix: autouse

* fix: more input types

* feat: remove ability to pass in loop

* fix: overload key gen
2025-04-10 08:18:17 -04:00
Nick Bradford 247730158e Update workflow.py to use model_dump(mode="json") (#1514)
* Update workflow.py to use model_dump(mode="json")

* drive-by: refactor a bit + fix incorrect input types

* chore: ver

---------

Co-authored-by: Nick Bradford <6633811+nsbradford@users.noreply.github.com>
Co-authored-by: mrkaye97 <mrkaye97@gmail.com>
2025-04-09 21:59:26 -04:00
Matt Kaye 4c97bd5c74 Fix: Test failures (#1510)
* fix: test name

* fix: shrink test

* fix: correct logic for group membership

* fix: expand test again
2025-04-08 18:16:50 -04:00
abelanger5 f09c1d11fa feat: multiple non-workflow level concurrency slots (#1508)
* feat: multiple non-workflow level concurrency slots

* feat: first pass at e2e test

* fix: lint

* fix: try sleeping?

* fix: namespacing

* chore: version

* feat: expand test

* Fix: Add `get_run_ref` to `runs` client (#1509)

* feat: add run ref

* chore: ver

* fix: expand standalone

---------

Co-authored-by: mrkaye97 <mrkaye97@gmail.com>
v0.58.8
2025-04-08 17:17:28 -04:00
abelanger5 29a7258e5c fix: match condition writes and retry counts on failure (#1507) v0.58.7 2025-04-08 13:34:33 -04:00
Matt Kaye 771b733e10 Feat: Add Parent Task External ID to workflow run details, Fix input type marshalling to null (#1505)
* feat: add parent task external id to api for workflow run

* feat: wire up parent ids

* feat: custom go type for non-null json

* feat: gen

* feat: send action ids back over the api

* fix: lint
v0.58.6
2025-04-07 23:40:13 -04:00
abelanger5 d8bb9e8b68 feat: add HATCHET_CLIENT_SERVER_URL to client config (#1506) 2025-04-07 23:39:39 -04:00
Gabe Ruttner dc757a36b5 fix: filter scope for bulk ops (#1503)
* fix: scope

* fix: default filter and both filter and ids

* release: 1.1.5
2025-04-07 15:48:54 -07:00
Matt Kaye 76c0bdfc17 [Python]: Batch Bulk Run Calls (#1504)
* chore: ver

* feat: auto-batch to max batch size of 1000 workflows

* fix: magic number

* feat: bulk for TS

* Revert "feat: bulk for TS"

This reverts commit edbe731bfb.
2025-04-07 17:10:50 -04:00
Gabe Ruttner bc72465b65 fix: list and cancel (#1502)
* fix: list

* fix: optional since

* fix: scope

* fix: keep nil ptr

* release: 1.1.3

* Update sdks/typescript/src/v1/client/features/runs.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
v0.58.5
2025-04-07 09:03:32 -04:00
abelanger5 d4e489996c fix: v1 edge cases on concurrency, go SDK, parent outputs (#1497)
* fix: v1 edge cases on concurrency, go SDK, parent outputs

* fix: overflow on queue metrics

* revert changes to DAG

* fix: remove prefix on error for Result method

* cleanup schema, fix migrations

* fix panic edge case
v0.58.4
2025-04-07 08:19:13 -04:00
dependabot[bot] 3bd28d65ac chore(deps): bump golang.org/x/sync from 0.12.0 to 0.13.0 (#1501)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.12.0 to 0.13.0.
- [Commits](https://github.com/golang/sync/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 05:10:40 +00:00
dependabot[bot] ed9603bf7a chore(deps): bump golang.org/x/text from 0.23.0 to 0.24.0 (#1498)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-version: 0.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 05:09:06 +00:00