OpenCue icon indicating copy to clipboard operation
OpenCue copied to clipboard

cuebot: Handle exceptions when moving hosts with running cores

Open akim-ruslanov opened this issue 2 years ago • 2 comments

Link the Issue(s) this Pull Request is related to. When you attempt to change allocation of a hoist with running cores, cuebot will throw an error that is not handled properly on cuegui side. This will render the application unusable until you relaunch it.

Summarize your change. When we make a cuebot call, there is a second layer for exception that will take every possible exception. Just like with CueException, an error message will appear with explanaition and the user can continue using the application after pressing OK. This will make sure it takes into account any unexpected error thrown by cuebot.

akim-ruslanov avatar Jul 12 '22 18:07 akim-ruslanov

Do you have an example of the error you're trying to catch here? I'm wondering, if the error is on the cuebot side, why it's not coming back as CueException.

@bcipriano an example could be com.imageworks.spcue.EntityModificationError. This error is thrown when you try to change allocation of a host with running cores. To replicate:

  1. Launch opencue
  2. Go to the "Manage Hosts" plugin
  3. Filter the hosts to "a" allocation
  4. Select a host that is running frames (the "Idle" is less than the "Cores")
  5. Right click the host and select "Change Allocation"
  6. Select any other allocation and click "Ok"
  7. Check the shell for the error
  8. The gui freezes and needs to be restarted to continue

akim-ruslanov avatar Jul 12 '22 23:07 akim-ruslanov

Found an actual reason for the problem. setAllocation API call was not encapsulated with @util.grpcExceptionParser decorator. This means that error were not parsed correctly so they could not get caught correctly either.

akim-ruslanov avatar Aug 10 '22 20:08 akim-ruslanov