Closed frrist closed 3 weeks ago
The changes introduce new APIs for handling wasm run
in the Bacalhau CLI. Key updates include modifications to the WasmRunOptions
struct, refactoring of functions for job creation and execution, and the addition of a WasmEngineBuilder
type for building wasm engine configurations. These changes aim to enhance the flexibility and maintainability of the codebase without altering user-visible CLI flags.
Files/Groups | Change Summary |
---|---|
cmd/cli/wasm/wasm_run.go |
Updated WasmRunOptions struct, refactored runWasm to run , replaced CreateJob with build , modified parseWasmEntryModule . |
cmd/cli/wasm/wasm_run_test.go |
Updated import paths and modified function calls to use updated client versions and data structures. |
cmd/util/flags/types.go |
Refactored functions to return pointers to models.InputSource and updated logic for creating storage specs. |
pkg/executor/wasm/models/types.go |
Introduced WasmEngineBuilder type with methods for building SpecConfig for wasm engines. |
sequenceDiagram
participant User
participant CLI
participant JobBuilder
participant WasmEngineBuilder
participant JobExecutor
User->>CLI: Execute `wasm run`
CLI->>JobBuilder: Build job with options
JobBuilder->>WasmEngineBuilder: Configure wasm engine
WasmEngineBuilder->>JobBuilder: Return SpecConfig
JobBuilder->>JobExecutor: Submit job
JobExecutor->>CLI: Return job result
CLI->>User: Display result
Objective (Issue #4021) | Addressed | Explanation |
---|---|---|
Use new APIs for wasm run |
✅ | |
Ensure no user-visible change and maintain CLI flags | ✅ | |
Support old flag names while printing new ones in help | ✅ |
In the code where wasm runs, New APIs dance under the sun, With flags old and new, Jobs sail smoothly through, A rabbit's work is never done. 🐇✨
[!WARNING]
Review ran into problems
Problems (1)
* Git: Failed to clone repository. Please contact CodeRabbit support.
@coderabbitai /review
@frrist, I will review the changes in the pull request.