luno / workflow

A tech stack agnostic Event Driven Workflow framework, written in Go, that supports durable, robust, and idempotent state changes with timeouts, callbacks, scheduled triggers, and await calls. Compatible with Kafka and Reflex out of the box.
BSD 3-Clause "New" or "Revised" License
112 stars 8 forks source link

workflow: Remove record ID and simplify record store #62

Closed andrewwormald closed 1 week ago

andrewwormald commented 2 weeks ago

The goal of this MR is to simplify workflow a bit. The goal is to reduce mental complexity by removing the ID field for Records. Originally Workflow considers workflow name + foreignID + runID as a unique key for each run. As time has gone on I have thought more and more around the scalability of UUID v4 and the the low collision probability that it has even at the quantillion range is only reaching 50% probability.

Considering this and the desire to simplify the data model I am proposing that the runID is made a globally unique identifier for a workflow run which also aligns it more to it's name of RunID instead of using a combination of workflow name + foreignID + runID.

All Submissions:

Checklist before requesting a review

New Feature Submissions:

  1. [x] Does your submission pass tests?
  2. [x] Did you install pre-commit hooks before committing?

Changes to Core Features:

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
92.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

calentang commented 1 week ago

hi,that very great code for workflow,can you support release of this luno/workflow project,thanks!

andrewwormald commented 1 week ago

HI @calentang, thank you! We will start tracking versions going forward. Thanks for reaching out!

Please see: https://github.com/luno/workflow/releases