Commit 08d312b
fix: address review comments — SDK compatibility, race condition, wording
1. Python SDK: Add STREAM_KEEPALIVE to ActionType enum so the SDK
recognizes the new value instead of crashing on unknown enum.
2. Python SDK: Make convert_proto_enum_to_python return None for
unknown enum values instead of raising KeyError. This makes the
SDK forward-compatible with future ActionType additions.
3. Python SDK: Skip STREAM_KEEPALIVE (and any unknown) actions early
in the action listener generator before attempting to parse payload.
4. Engine: Use subscribedWorker.sendMu mutex for keepalive sends to
avoid racing with real AssignedAction dispatches from other goroutines.
gRPC server streams are not safe for concurrent sends.
5. Engine: Update comment to say "periodic" instead of "idle" — the
keepalive fires unconditionally at the interval, not only when idle.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 0c9f082 commit 08d312b
File tree
4 files changed
+36
-13
lines changed- internal/services/dispatcher
- sdks/python/hatchet_sdk
- clients/dispatcher
- runnables
- utils
4 files changed
+36
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
| 347 | + | |
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| |||
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
| |||
397 | 400 | | |
398 | 401 | | |
399 | 402 | | |
400 | | - | |
| 403 | + | |
| 404 | + | |
401 | 405 | | |
402 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
403 | 410 | | |
404 | 411 | | |
405 | 412 | | |
| |||
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
218 | 229 | | |
219 | 230 | | |
220 | 231 | | |
| |||
239 | 250 | | |
240 | 251 | | |
241 | 252 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 253 | + | |
247 | 254 | | |
248 | 255 | | |
249 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments