-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Pull requests are squashed and merged using: - their title as the commit message - their description as the commit body Having a good title and description is important for the users to get readable changelog. --> <!-- 1. Explain WHAT the change is about --> - Solves [MET-667](https://linear.app/metatypedev/issue/MET-667/gate-unify-the-worker-manager-between-workflows-and-runtime) - [x] `BaseWorkerManager` - [x] Use in Deno runtime - [ ] ~Use in Python runtime~ _(followup PR)_ - [ ] ~Use in Rust runtime~ _(followup PR)_ - [ ] ~Worker pooling~ _(followup PR)_ <!-- 2. Explain WHY the change cannot be made simpler --> <!-- 3. Explain HOW users should update their code --> #### Migration notes --- - [ ] The change comes with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit Based on the comprehensive summary, here are the updated release notes: - **New Features** - Enhanced worker management system with improved task tracking and execution. - Introduced new `WorkerManager` for more robust Deno runtime operations. - Added support for inline artifact generation and management. - New asynchronous method `getInlineArtifact` in the `ArtifactStore` class. - **Improvements** - Streamlined messaging and event handling across different runtime components. - Improved error reporting and task lifecycle management. - Refined type definitions for better type safety. - **Breaking Changes** - Removed `DenoMessenger` and `LazyAsyncMessenger` classes. - Restructured workflow event and message handling. - Updated task ID generation mechanism. - **Performance** - Optimized worker initialization and task execution. - Introduced more efficient task tracking and resource management. - **Bug Fixes** - Improved error handling in worker and runtime environments. - Enhanced message communication between workers and main thread. - Removed outdated test cases to focus on relevant functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
21 changed files
with
770 additions
and
944 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
import { TaskContext } from "./shared_types.ts"; | ||
|
||
export type TaskSpec = { | ||
modulePath: string; | ||
functionName: string; | ||
}; | ||
|
||
export type DenoMessage = { | ||
type: "CALL"; | ||
modulePath: string; | ||
functionName: string; | ||
args: unknown; | ||
internals: TaskContext; | ||
}; | ||
|
||
export type DenoEvent = | ||
| { type: "SUCCESS"; result: unknown } | ||
| { type: "FAILURE"; error: string; exception: Error | undefined }; |
Oops, something went wrong.