Skip to content

Feature: Add Task dependencies to allow auto stacking and upload on scan completion - #143

Open
esto-openscan wants to merge 8 commits into
OpenScan-org:developfrom
esto-openscan:feature/auto-stack
Open

Feature: Add Task dependencies to allow auto stacking and upload on scan completion#143
esto-openscan wants to merge 8 commits into
OpenScan-org:developfrom
esto-openscan:feature/auto-stack

Conversation

@esto-openscan

Copy link
Copy Markdown
Member

Tasks can now be chained by making one task depend on another. Dependent tasks wait for successful completion of their prerequisite. Added a new depends_on field to Tasks and added Task Manager logic.

Closes #126

- Introduced `depends_on` parameter for creating tasks with prerequisites.
- Tasks can now wait for specified dependencies to complete before execution.
- Added validation to prevent cyclic dependencies and ensure dependency existence.
- Updated task manager to handle dependency-based scheduling and error propagation.
- Enhanced tests to cover dependency scenarios, including successful execution and failure cases.
- Applied changes across all API versions (`v0.8`, `v0.9`, `next`).
- Added integration tests for real-world task dependency chains, including success, failure, and cancellation propagation.
- Enhanced unit tests to validate edge cases like cyclic dependencies, missing dependencies, and task completion after dependencies.
- Updated task manager to set all non-terminal tasks (e.g., pending, running, paused) to `INTERRUPTED` on app shutdown.
- Added `_consume_completed_dependency` to detach completed dependencies from waiting tasks.
- Enhanced scheduling logic to handle manually restarted tasks with dependencies.
- Improved test coverage for task recovery scenarios, including shutdown interruptions, manual restarts, and dependency completions.
…versions

- Introduced `depends_on` parameter to enable task chaining by making one task wait for the completion of another.
- Updated scan, focus-stacking, and cloud-upload endpoints to support this feature.
- Clarified usage of generic task endpoints for experimental tasks; domain-specific tasks must use their dedicated endpoints.
- Added validation and error handling for dependency scenarios across task services.
- Enhanced tests to cover dependency chains, including prerequisites and error propagation.
- Updated documentation for task dependency features and endpoint usage.
- Added `depends_on` parameter across all API versions (`v0.8`, `v0.9`, `next`) to enable task dependency chaining.
- Updated task descriptions to document new dependency functionality.
- Improved schema and query validation for handling prerequisite tasks.
…workflow

- Updated logic to handle interrupted tasks by resuming with persisted progress or recreating missing tasks.
- Added deletion of terminal tasks during new focus stacking runs to prevent duplicate records.
- Improved `resume_task` and `restart_task` behavior for interrupted tasks, differentiating them from paused or failed tasks.
- Expanded test coverage for interrupted task scenarios, including persistence and recovery.
…ery and improve docs and API specs

- Enhanced handling of interrupted focus stacking and scan tasks, reusing progress and batching.
- Added task replacement logic to retain dependent task chains during recovery.
- Updated endpoints (`/resume`) to reflect changes for interrupted task resumption and dependency management.
- Improved test coverage for task replacement, dependency retention, and task-state persistence.
- Updated changelog to reflect focus stacking and scan task recoverability.
…sk-related test cases

- Updated test case names to emphasize lack of dependency inheritance in task replacements.
- Adjusted assertions to reflect changes in dependency assignment for replaced tasks.
- Refactored related service logic to simplify dependency management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Auto stack images on scan completion

1 participant