Skip to content
Open
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
786a1e9
fix: small optimization, no need to query if there are no claims
mrkaye97 May 7, 2026
09b749e
feat: add idempotency key expr to proto, workflow version
mrkaye97 May 7, 2026
85c9c1f
feat: wiring
mrkaye97 May 7, 2026
912d471
fix: wiring to db
mrkaye97 May 7, 2026
247dd6c
feat: add ttl col
mrkaye97 May 7, 2026
890d513
Merge branch 'main' into mk/feat-idempotency
mrkaye97 May 29, 2026
92e3c37
chore: gen a whole bunch of python
mrkaye97 May 29, 2026
d490686
feat: wire up idempotency config on the sdk
mrkaye97 May 29, 2026
73beb46
fix: engine wiring
mrkaye97 May 29, 2026
3054857
fix: py type
mrkaye97 May 29, 2026
8214dfd
chore: revert worker changes
mrkaye97 May 29, 2026
5b432bb
feat: new example
mrkaye97 May 29, 2026
5234b9a
feat: fix migration, add cols
mrkaye97 May 29, 2026
dff7c68
feat: wiring
mrkaye97 May 29, 2026
0e6a5b0
feat: wire up idempotency to the triggerTuple
mrkaye97 May 29, 2026
30fb2fa
feat: initial engine wiring
mrkaye97 May 29, 2026
3fec245
fix: len
mrkaye97 May 29, 2026
ed2d3e6
fix: types
mrkaye97 May 29, 2026
3095268
feat: add test
mrkaye97 May 29, 2026
d079090
chore: rm unused deps
mrkaye97 May 29, 2026
67f34f8
fix: use the v1 trigger endpoint on python
mrkaye97 Jun 1, 2026
ecd2b6c
fix: make the python test do a real thing
mrkaye97 Jun 1, 2026
4e7aff9
feat: first pass bypassing mq fallback for idempotency
mrkaye97 Jun 1, 2026
222175a
fix: remove todo, return the same id
mrkaye97 Jun 1, 2026
4942ad4
feat: wire up existing run ids
mrkaye97 Jun 1, 2026
7a7e5f8
fix: use test run id to dedupe across test runs
mrkaye97 Jun 1, 2026
a61c858
fix: improve test a bit
mrkaye97 Jun 1, 2026
5089761
Merge branch 'main' into mk/feat-idempotency
mrkaye97 Jun 2, 2026
3ceb405
chore: lock
mrkaye97 Jun 2, 2026
ca5f63c
fix: add grpcio types
mrkaye97 Jun 2, 2026
0e4cafb
fix: drive by fix for a flaky test caused by event condition race
mrkaye97 Jun 2, 2026
9929b37
fix: not found behavior on the get_details method
mrkaye97 Jun 2, 2026
e5d5402
fix: revert python changes
mrkaye97 Jun 2, 2026
1c93e1c
fix: handle collisions in the v1 ingest endpoint :facepalm:
mrkaye97 Jun 2, 2026
05196fa
chore: gen
mrkaye97 Jun 2, 2026
4f3103c
chore: add back some comments to shrink diff
mrkaye97 Jun 2, 2026
71784e7
chore: python version, changelog
mrkaye97 Jun 2, 2026
cdd0f43
fix: use the correct tx
mrkaye97 Jun 2, 2026
bfc997b
fix: couple query bugs
mrkaye97 Jun 2, 2026
7bcaace
fix: couple more event changes
mrkaye97 Jun 2, 2026
4781050
feat: idempotency test with events
mrkaye97 Jun 2, 2026
3228fc7
fix: type issue
mrkaye97 Jun 2, 2026
8cc8500
fix: tests, lint
mrkaye97 Jun 2, 2026
ed36fc5
fix: test cleanup
mrkaye97 Jun 2, 2026
98823da
fix: handle deduplication in the query
mrkaye97 Jun 2, 2026
c363098
fix: test, gen
mrkaye97 Jun 2, 2026
99b4a33
Merge branch 'main' into mk/feat-idempotency
mrkaye97 Jun 3, 2026
31c4742
fix: conflict
mrkaye97 Jun 3, 2026
59f0fcf
fix: add prefix to idempotency key claim, clean up a tiny bit
mrkaye97 Jun 3, 2026
1ddb00b
fix: migration name, add idempotency key to cel eval failure source enum
mrkaye97 Jun 3, 2026
70ff89a
fix: pr comments
mrkaye97 Jun 3, 2026
5dcc913
chore: gen
mrkaye97 Jun 3, 2026
6667e58
feat: snippets, initial doc work
mrkaye97 Jun 3, 2026
f01f0de
chore: vibe code other sdks
mrkaye97 Jun 3, 2026
0bdfc1c
chore: vendor the status proto for js
mrkaye97 Jun 3, 2026
de07a78
fix: go docs
mrkaye97 Jun 3, 2026
8ec5334
fix: ruby simplification
mrkaye97 Jun 3, 2026
a9ae548
chore: changelogs
mrkaye97 Jun 3, 2026
cf744a9
fix: ruby ci
mrkaye97 Jun 3, 2026
4196bae
fix: more test fixes
mrkaye97 Jun 3, 2026
342ab25
chore: gen
mrkaye97 Jun 3, 2026
6c46e84
chore: gen again
mrkaye97 Jun 3, 2026
02df6ad
fix: tests
mrkaye97 Jun 3, 2026
be351c2
chore: gen
mrkaye97 Jun 3, 2026
d3b0a76
Merge branch 'main' into mk/feat-idempotency
mrkaye97 Jun 3, 2026
c9b5e1d
chore: changelogs
mrkaye97 Jun 4, 2026
744b56d
Merge branch 'main' into mk/feat-idempotency
mrkaye97 Jun 4, 2026
433ebfc
chore: lockfile
mrkaye97 Jun 4, 2026
82b3976
chore: lint
mrkaye97 Jun 4, 2026
f399e4e
chore: appease the cop
mrkaye97 Jun 4, 2026
21756f7
chore: fix copilot comments
mrkaye97 Jun 4, 2026
94f1c92
Merge branch 'main' into mk/feat-idempotency
mrkaye97 Jul 2, 2026
1362a02
chore: gen
mrkaye97 Jul 2, 2026
550a283
chore: migration version
mrkaye97 Jul 2, 2026
f4a4f00
Merge branch 'main' into mk/feat-idempotency
mrkaye97 Jul 8, 2026
77f8518
chore: migration version
mrkaye97 Jul 8, 2026
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
10 changes: 10 additions & 0 deletions api-contracts/v1/workflows.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,18 @@ message CreateWorkflowVersionRequest {
repeated Concurrency concurrency_arr = 12; // (optional) the workflow concurrency options
repeated DefaultFilter default_filters = 13; // (optional) the default filters for the workflow
optional bytes input_json_schema = 14; // (optional) the JSON schema for the workflow input

optional IdempotencyConfig idempotency = 15; // (optional) idempotency configuration for the workflow
}

message IdempotencyConfig {
string expression = 1; // a CEL expression for determining the idempotency key for workflow runs
int64 ttl_ms = 2; // time-to-live for idempotency keys in milliseconds
}

message IdempotencyCollisionError {
string existing_run_external_id = 1; // the external ID of the existing workflow run that caused the collision
}

message DefaultFilter {
string expression = 1; // (required) the CEL expression for the filter
Expand Down
2 changes: 1 addition & 1 deletion api/v1/server/oas/transformers/v1/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func ToV1Event(event *v1.EventWithPayload) gen.V1Event {
},
Payload: &payload,
SeenAt: &event.EventSeenAt.Time,
Scope: &event.EventScope,
Scope: event.EventScope,
TriggeredRuns: &triggeredRuns,
TriggeringWebhookName: event.TriggeringWebhookName,
}
Expand Down
17 changes: 17 additions & 0 deletions cmd/hatchet-migrate/migrate/migrations/20260702180517_v1_0_124.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE "WorkflowVersion"
ADD COLUMN "idempotencyKeyExpression" TEXT,
ADD COLUMN "idempotencyKeyTtlMs" BIGINT
;

ALTER TYPE v1_cel_evaluation_failure_source ADD VALUE IF NOT EXISTS 'IDEMPOTENCY_KEY';
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
ALTER TABLE "WorkflowVersion"
DROP COLUMN "idempotencyKeyExpression",
DROP COLUMN "idempotencyKeyTtlMs"
;
-- +goose StatementEnd
59 changes: 59 additions & 0 deletions examples/go/idempotency/trigger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 64 additions & 0 deletions examples/go/idempotency/trigger/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions examples/go/idempotency/worker.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions examples/go/idempotency/worker/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions examples/python/idempotency/trigger.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions examples/python/idempotency/worker.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions examples/python/worker.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions examples/ruby/idempotency/trigger.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading