ynput / ayon-houdini

Houdini addon for AYON
Apache License 2.0
11 stars 9 forks source link

Bugfix: Farm cache publish support newer ayon-deadline versions #164

Closed BigRoy closed 2 weeks ago

BigRoy commented 3 weeks ago

Changelog Description

Set the publish.hou family much earlier to avoid issues with ayon-deadline plug-ins that were ordered earlier than how we set it before this PR in ayon-houdini.

Additional review information

Fixes #138

Testing notes:

  1. Use latest ayon-deadline
  2. Publish farm cache
  3. Should work
BigRoy commented 2 weeks ago

it was wrong.

Actually - it was right. @MustafaJafar both create from context and this one being at -0.5 made it ambiguous which would run first. This could be -0.499 sure, but it MUST run after that one because that is what creates the instances from the Create Context.

MustafaJafar commented 2 weeks ago

it was wrong.

Actually - it was right. @MustafaJafar both create from context and this one being at -0.5 made it ambiguous which would run first. This could be -0.499 sure, but it MUST run after that one because that is what creates the instances from the Create Context.

So, the -0.5 is valid but it conflicts with CollectFromCreateContext.

BigRoy commented 2 weeks ago

I wonder if CollectFarmCacheFamily plugin can be replaced by using the get_publish_families method.

Sort of. But it shouldn't be there ALL the time, but only if farm is enabled on the instance. So we'd need to make that dynamic (which is possible now with value changed callbacks) however then the Deadline plug-ins wouldn't "dynamically" respond to that by default and the deadline plug-ins would need to actively listen for changes on the families to dynamically update as soon as the instance's families changes through such a toggle in the UI.

But, do we need to make this plugin run at earlier time? the CollectJobInfo has a late value pyblish.api.CollectorOrder + 0.420

Honestly - I'd prefer to have it the EARLIEST so that it's entirely clear that is doesn't really depend on anything else. Whereas there may be more things relying on targeting publish.hou families over time.

But making this a changed callback since https://github.com/ynput/ayon-core/pull/994 is merged could avoid this plug-in as described above.

BigRoy commented 2 weeks ago

Merging this - because it fixes a bug. We can turn it into changed callback in separate PR.

MustafaJafar commented 2 weeks ago

But, do we need to make this plugin run at earlier time? the CollectJobInfo has a late value pyblish.api.CollectorOrder + 0.420

I forgot about that context plugin CollectDeadlineJobEnvVars that has pyblish.api.CollectorOrder order. and this PR fixed the issue where the submitted jobs didn't have the proper env variables to run.

so it does fix a bug thank you.