Repository navigation
release: v0.5.0 - #40
Merged
Merged
Conversation
BREAKING: task steps now receive a TaskContext. The step-closure signature changed from FnMut() -> Future to FnMut(TaskContext) -> Future; add a parameter to every step (use |_ctx| to ignore it). Lifecycle callbacks (on_success/on_failure/on_finish) are unchanged. - Added TaskContext, handed to every step for each attempt: identity (task_id, task_name, run_id, step_index, attempt), a task-level Blackboard (ctx.blackboard()), and a fresh per-run store (ctx.run_store()) for XCom-like step-to-step data flow within a run (B-ergo-2) - Added TaskBuilder::blackboard(...) to attach a shared task-level blackboard (defaults to a fresh, empty one) - Added TaskSpawner<T> (via TaskScheduler::spawner) for adding tasks to a running scheduler: spawn() is fire-and-forget, spawn_get_id() awaits the assigned id or a duplicate-name/execution error; requests are drained each scheduler round - Observable/controllable registry is now populated at add_task time, so a SchedulerHandle can observe and control tasks before run() is called, not only mid-round - Exported TaskContext and TaskSpawner from the crate root - Migrated all existing steps, doctests and the 10 bundled examples to the new |_ctx| signature; added examples/context_and_spawner.rs (per-run store handoff, task-level blackboard across runs, runtime task injection) - Added unit and doctests (96 unit + 49 doctests by default; 98 unit + 49 doctests with --features serde); clippy --all-targets, fmt and cargo doc -D warnings clean - Updated README (new "Step context and data flow" and "Adding tasks at runtime" sections, 0.4->0.5 migration notes) and lib.rs Highlights - Bumped version to 0.5.0
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #40 +/- ##
==========================================
+ Coverage 76.46% 76.93% +0.47%
==========================================
Files 7 7
Lines 684 750 +66
==========================================
+ Hits 523 577 +54
- Misses 161 173 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING: task steps now receive a TaskContext. The step-closure signature changed from FnMut() -> Future to FnMut(TaskContext) -> Future; add a parameter to every step (use |_ctx| to ignore it). Lifecycle callbacks (on_success/on_failure/on_finish) are unchanged.