Closed morgante closed 2 months ago
crates/cli/src/commands/apply_migration.rs (2)
`29-30`: **LGTM!** The update to the `help` attribute of the `remote` field clarifies the dependency between the `remote` and `workflow_id` options. This improves the usability of the CLI. --- `33-35`: **LGTM!** The addition of the `workflow_id` field, along with the `#[clap]` attribute specifying the dependency on the `remote` field, enhances the clarity of the CLI by making the relationship between `remote` and `workflow_id` explicit.crates/cli/src/commands/apply.rs (1)
`70-71`: **LGTM!** The code changes are approved. The simplification of the `run_remote_workflow` call by reducing the number of arguments passed aligns with the design decision to streamline the parameters. The removal of the `args.pattern_or_workflow` argument suggests that it is no longer needed in the context of remote workflows. The control flow remains intact, and there are no apparent issues or side effects introduced by this change.crates/cli/src/commands/plumbing.rs (1)
`335-335`: **LGTM!** The addition of the optional `workflow_id` field to the `ApplyMigrationArgs` struct enhances the flexibility of the `run_apply_migration` function by allowing it to associate a workflow with a specific ID. This change appears to have minimal impact on the existing logic as the `workflow_id` is initialized to `None`. The code changes are approved.crates/cli/src/workflows.rs (2)
`299-301`: **LGTM!** The changes to extract `workflow_id` from `args.workflow_id` using pattern matching and raising an error if it's not provided, enhance the robustness of the function by enforcing the requirement for a `workflow_id` and handling its absence explicitly. --- `304-304`: **LGTM!** Updating the `RemoteWorkflowSettings` construction to use `workflow_id` instead of `workflow_name` streamlines the parameters used in the workflow settings and aligns with the removal of the `workflow_name` parameter.
(Avoid populating the UI with many useless one-off instances.)
Summary by CodeRabbit
New Features
workflow_id
field for remote migrations, enhancing command usability.remote
andworkflow_id
.Bug Fixes
workflow_id
.Refactor