lib/command/run.rb in cpflow-3.0.1 vs lib/command/run.rb in cpflow-4.0.0

- old
+ new

@@ -241,11 +241,11 @@ return unless should_update step("Updating runner workload '#{runner_workload}'") do # Update runner workload - @expected_deployed_version = cp.cron_workload_deployed_version(runner_workload) + 1 + @expected_deployed_version = (cp.cron_workload_deployed_version(runner_workload) || 0) + 1 cp.apply_hash("kind" => "workload", "name" => runner_workload, "spec" => spec) end end def wait_for_runner_workload_deploy @@ -254,11 +254,11 @@ end end def wait_for_runner_workload_update step("Waiting for runner workload '#{runner_workload}' to be updated", retry_on_failure: true) do - cp.cron_workload_deployed_version(runner_workload) >= expected_deployed_version + (cp.cron_workload_deployed_version(runner_workload) || 0) >= expected_deployed_version end end def start_job job_start_yaml = build_job_start_yaml @@ -304,10 +304,10 @@ # Catch Ctrl+C in the forked process trap("SIGINT") do exit(ExitCode::SUCCESS) end - Cpflow::Cli.start(["logs", *app_workload_replica_args]) + run_cpflow_command("logs", *app_workload_replica_args) end Process.detach(logs_pid) exit_status = wait_for_job_status