ynput / ayon-nuke

Nuke addon for AYON
Apache License 2.0
3 stars 7 forks source link

AYON 'onScriptSave' callback can block saving workfile if it errors #33

Open jrsndl opened 1 day ago

jrsndl commented 1 day ago

Is there an existing issue for this?

Current Behavior:

Ayon uses onScriptSave callback to update nodes' colors. If this fails by any reason, artist is not able to save the file.

https://github.com/ynput/ayon-nuke/blob/b92271160f3547f986e0b9425275ef7f11b2bbdf/client/ayon_nuke/api/pipeline.py#L166

Expected Behavior:

Failing the callback should not block the save.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Open Nuke workfile, make some changes
  2. Stop Ayon server
  3. Save

Are there any labels you wish to add?

Relevant log output:

No response

Additional context:

No response

BigRoy commented 1 day ago

Thanks for the report.

  1. Do you have a reproducable how to make it fail?
    • And does it still log an error / provide a stack trace? If so, could you attach one?
  2. Does it work if we make the callback itself run completely within a try..except
jrsndl commented 1 day ago
  1. Do you have a reproducable how to make it fail?

This did happen when artist lost connection to the Ayon server, I will have to find a way to sabotage it.

  • And does it still log an error / provide a stack trace? If so, could you attach one?

Yes. I didn't save the trace, but it failed here: filtered_containers = filter_containers(containers, project_name)

  1. Does it work if we make the callback itself run completely within a try..except

Yes, try / except in check_inventory_versions worked.

Sorry fon non-complete report, I had to help artists yesterday, making issue today so I do not forget.

BTW I had similar problem in OpenPype, once in a while the OpenPype was not able ro read some knob and artist was not able to save. image