krane icon indicating copy to clipboard operation
krane copied to clipboard

Make ResourceWatcher responsible for raising group-status-based errors

Open KnVerey opened this issue 7 years ago • 1 comments

Currently the RunnerTask, RestartTask and DeployTask each have some code like this:

      raise DeploymentTimeoutError if resources.any(&:deploy_timed_out?)
      raise FatalDeploymentError if resources.any?(&:deploy_failed?)

We should see if it could work to move that responsibility to the ResourceWatcher to avoid the duplication. Note that the watcher is already responsible for raising global timeout errors.

KnVerey avatar Oct 09 '18 21:10 KnVerey

I have mixed feelings on if the resource watcher should raise or not. But I definitely think resource watcher should be responsible for checking the overall status of a deployment instead of checking each resource individually. I started down that route in the state machine refactor #303

dturn avatar Oct 09 '18 21:10 dturn