ynput / ayon-deadline

Deadline addon for AYON
Apache License 2.0
3 stars 11 forks source link

Publish validation errors generate nicer validation logs in Deadline #59

Open BigRoy opened 1 week ago

BigRoy commented 1 week ago

Is there an existing issue for this?

Please describe the feature you have in mind and explain what the current shortcomings are?

Currently whenever a Publish Job fails on Deadline, the error log at the top usually contains this:

=======================================================
Error
=======================================================
Error: Renderer returned non-zero error code, 1. Check the log for more information.
   at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type
=======================================================
RenderPluginException

=======================================================
Stack Trace
=======================================================
   at Deadline.Plugins.SandboxedPlugin.d(DeadlineMessage bgq, CancellationToken bgr)
   at Deadline.Plugins.SandboxedPlugin.RenderTask(Task task, CancellationToken cancellationToken)
   at Deadline.Slaves.SlaveRenderThread.c(TaskLogWriter ajv, CancellationToken ajw)

=======================================================
Log
=======================================================

But the actual validation error may have been:

Version '11' from instance 'pointcacheMain' that you are trying to publish is lower or equal to an existing version in the database. Version in database: '11'. Please version up your workfile to a higher version number than: '11'.

Suggested implementation?

It would be great if there was a way to fail the job, but with the invalid validations very clearly out in the error message that Deadline throws out. Or find other ways to make it much easier for anyone to investigate the reason the publish session may have failed.

Describe alternatives you've considered:

Another approach than trying to just influence the "logs" itself would be to implement Publish JSON report creation from headless publish in Create Context in core, see: https://github.com/ynput/ayon-core/issues/946

With that implemented the publish could create such a publish result .json. Then we can add custom AYON scripts to Deadline, so that one could e.g. right click a publish-job and it would either automatically copy the JSON report file to clipboard (to e.g. share anywhere else) or even open it directly in the AYON JSON Publish report viewer so they can investigate directly without needing to investigate the logs manually.