You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A property setter is conventionally a cheap, predictable mutation.
Here, every assignment triggers an HTTP/PUT (StorageS3, StorageGCS) — surprising and opaque to readers.
The engine assigns current_context at multiple points
(engine.py:86, 115, 138, 175) which means N round-trips per task.
Failure in storage raises inside the setter, mixing object
state mutation with I/O failure.
Unit tests for Task cannot mutate current_context without a
full storage mock.
Labels:
enhancement,significantContext
dotflow/core/task.py:178-187performs remote I/O inside a property setter:Problems
Here, every assignment triggers an HTTP/PUT (
StorageS3,StorageGCS) — surprising and opaque to readers.current_contextat multiple points(
engine.py:86, 115, 138, 175) which means N round-trips per task.state mutation with I/O failure.
Taskcannot mutatecurrent_contextwithout afull storage mock.
the setter has no clean place to receive it.
Concept
Separate state mutation from persistence.
_current_context.step completes successfully.
Proposed change
Acceptance criteria
current_contextsetter no longer callsstorage.postStorageDefault,StorageFile,StorageS3,StorageGCS(verified by existing test suite)current_contextdoes not call anystorage method when the storage is a fresh mock
Optional follow-up
A
BatchStoragedecorator that buffers writes for very high-volume pipelines. Out of scope here.