Replies: 2 comments 1 reply
-
I'd love to see super-lightweight functional annotations, similar to what i can do in celery: @hatchet.fn("my-custom-workflow")
def foo(x: int, y: str) -> dict
... |
Beta Was this translation helpful? Give feedback.
-
There are so many things that I really like about the proposed changes:
These changes make meaningful improvements to some gaps that I feel when working with Hatchet in Python:
That second point, though, still feels lacking. It's cumbersome to define + reason about + exert runtime control over DAG edges, and the best (I think) I can do is really lean into direct child workflow execution of very small, often single-step, workflows. Here are a few ideas for focus areas to improve ^:
Happy to elaborate on any of these! Again, love the proposed changes and excited for where Hatchet is headed 🚀 |
Beta Was this translation helpful? Give feedback.
-
Hi everyone!
We're working on making our SDKs easier to use, and are looking for feedback from all of you on what you like, dislike, would like to see, and so on about them from your experiences working with them day to day.
In particular, we're thinking about how workflows and steps are defined with the SDK, and how to improve type support when working with them in your codebases. For example, you might define a workflow with one step like this:
In our view, there are a couple of cons here:
hatchet.admin.aio.run_workflow(name="ExampleWorkflow", input={"the_meaning_of_life": 314})
. There are a couple of clear cons here:ExampleWorkflow
by its name (the string) when triggering it, which is difficult for maintainability in large code bases.input
is untyped, so you need to refer back to the workflow definition to understand the shape of the input.worker.register_workflow(ExampleWorkflow()
.Proposal
I opened up this PR with a proposal for how we might leverage the V2 SDK for solving all three of these problems. The description of that change has some details on how usage would look and what it would allow.
At a high level, it attempts to solve all three of the problems above.
Feedback
If you've made it this far, thank you! We'd love some feedback on these approaches or any others that you think might make sense! In particular:
Beta Was this translation helpful? Give feedback.
All reactions