-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuke: simplified deadline submission on write node - AY-974 #314
Nuke: simplified deadline submission on write node - AY-974 #314
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tokejepsen could we add some better UX communication in case the sanity check for the connection is failing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks solid and feature was working for me. I would add some webservice sanity check and button on demand and then it is good to be merged. Thanks @tokejepsen for the speed!
@jakubjezek001 could you elaborate on the what you want to happen? The error for webservice should not happen if setup correctly, so should not really be artists facing. |
This matches pretty closely the functionality we have at Hornet, but retains the paradigm of having a publish for every submission if i'm understanding the call to |
os.path.basename(base), formatted_timestamp, ext | ||
) | ||
path = os.path.join(directory, filename).replace("\\", "/") | ||
context.data["currentFile"] = path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to hijack the publishing logic this much? This looks like an anti-pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got any suggestions to improve it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like:
- Collect instances
- Find the relevant instance
- Set the relevant instance attribute value (toggle the active state, etc.)
- Continue publish with only that instance active
Which would be along the lines of:
# pseudocode
create_context = CreateContext(host)
for instance in create_context.instances:
instance.data["active"] = is_the_relevant_intsance(instance)
instance.data["render_mode"] = "farm" # or whatever the attribute definition and value is
try:
create_context.publish()
except PublishFailed:
report = create_context.get_report()
show_message_dialog("Publish failed", report, level="critical")
This should essentially all be handled by 'default publishing logic' - we just want to trigger it simply for this one instance, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The client has requested to have a timestamped workfile instead of rendering from the current workfile, hence the hijacked publishing process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The client has requested to have a timestamped workfile instead of rendering from the current workfile, hence the hijacked publishing process.
I mean - that sounds just as useful for any farm submission. Why not implement it in the regular publishing logic?
Even more so - wasn't there like tons of logic already that allowed farm rendering to basically render from a published workfile which in essence is exactly that - a 'stamped' static version for the farm? (Timestamp is then the publish datetime, etc.) - I know Maya has that and uses it e.g. for the submissiosn to the farm.
This client request and how it's implemented here is then even worse than I thought. This feels like something to take back to the drawing board and simplify across the board. This doesn't sound like a problem unique to this particular Nuke submission - but to any farm submission.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even more so - wasn't there like tons of logic already that allowed farm rendering to basically render from a published workfile which in essence is exactly that - a 'stamped' static version for the farm? (Timestamp is then the publish datetime, etc.) - I know Maya has that and uses it e.g. for the submissiosn to the farm.
Client does not want a published workfile to clutter the database.
I guess we could have the whole thing using targets
in Pyblish, which then would gets a custom extraction/integration, but that wont use a lot of the existing code.
@jakubjezek001 could you weigh in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client does not want a published workfile to clutter the database.
This feels quite related to this Ynput Community forum discussion on not publishing directly, but first making a 'reviewable' first.
Anyway, since your logic is still not removing the workfile instance, nor removing it - isn't it still being published?
Also, this very much feels like a very specific client request - which may, as it stands, not be mergable into the main codebase if their workflow needs to deviate this much?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, since your logic is still not removing the workfile instance, nor removing it - isn't it still being published?
True, did not notice that. The publishing does not actually publish the workfile when testing, and I dont know why, but I've deactivated the instance just in case.
@kjpoli yes, the processing of the submission is blocking Nuke, but should not take long to process since you are just copying the workfile and submitting that. |
@@ -142,3 +149,150 @@ def is_headless(): | |||
bool: headless | |||
""" | |||
return QtWidgets.QApplication.instance() is None | |||
|
|||
|
|||
def create_error_report(context): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's too bad this is in nuke.api.utils
- this is really something that should be "easy" to retrieve from the publishing API and should not need a 'nuke specific implementation' I would say.
Anyway, docstring would be welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be at least renamed to create_publish_error_report
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👆
client/ayon_core/hosts/nuke/plugins/create/create_write_render.py
Outdated
Show resolved
Hide resolved
I really don't get what this is doing. Is the Our integration of OP in Nuke separates very clearly the rendering vs the publishing, on the write node we only expose the options to streamline the render and write either locally or in the farm (completely split from any publish process), like this screenshot shows: https://community.ynput.io/t/nuke-creators-as-nodes/124/4?u=fabiaserra for the Deadline submission to use a copy of the script and not the workfile you simply need to avoid passing the And then to publish a write node directly we have a util command they can run by simply selecting the write node and typing
It would be very straightforward to add this command as a button directly on the Write node. What am I missing? It really is not beneficial to tie rendering and publishing together as I have said multiple times here and in Houdini discussions because you really want to reduce the issues that arise when rendering and adding Ayon to the mix just creates more issues so I hope this is not doing that? |
@fabiaserra the
@fabiaserra thanks for the code! This is doing almost the same thing, but without showing the publishing window. Just error messages if there is any during "publishing" (in quotes here, cause we are not actually publishing anything) or a message if the submission was successful. |
How is that not contradictory? hahah you say the button does a headless publish but it doesn't do any publish? Please explain
You are just reusing the publish code to do the render submission but skip the publish dependency task? |
This really sounds like they just want a button that does:
|
…ne-submission-on-write-node
@tokejepsen can we finalize this PR. It seems that it would be good to merge after some cosmetic suggestions are applied. |
…ne-submission-on-write-node
…ne-submission-on-write-node
client/ayon_core/modules/deadline/plugins/publish/submit_nuke_deadline.py
Outdated
Show resolved
Hide resolved
client/ayon_core/hosts/nuke/plugins/publish/collect_headless_farm.py
Outdated
Show resolved
Hide resolved
client/ayon_core/hosts/nuke/plugins/publish/collect_headless_farm.py
Outdated
Show resolved
Hide resolved
client/ayon_core/hosts/nuke/plugins/create/create_write_prerender.py
Outdated
Show resolved
Hide resolved
I have nasty question, why it is named |
This is not a nasty question at all, this is something that I raised already in the very beginning of this PR #314 (comment) on how confusing and convoluted the implementation of this is. Sorry to play devil's advocate (again), you can ignore me if you want but please hear me out, the fact that this PR is still going and the numerous comments, validate my initial point. You are trying to fit a solution into a framework that wasn't designed for this and we will keep suffering from it and wasting more and more time unless you pivot and re-design the framework to be not only for publishing but having separate APIs. Deadline submissions are something that's already been solved a long time ago and it works in most of the DCCs that it's supported for, we don't need to reinvent the wheel and add more technical debt to the codebase. It's the exact same issue you are having in Houdini and that I have raised quite a few times, you are trying to hijack the publish system to do rendering and do just a subset of the things you can do already with vanilla Deadline implementation. You could argue that you'd want to run the same validation plugins that you run during publish during the render submission but then just abstract the validation parts of the framework so you can run them before submitting the render to Deadline using an abstracted API that's just for that and don't make the system even more confusing. The argument you said for the reason to do it this way was to do it for "simplicity" and to have something ready before you have resources to do it properly... but the fact that this PR has been opened for 2 months prove that's not simple and quick!! Are we going to keep creating PRs such as this to support deadline submission on every publish type? Studios can already benefit from all the things supported by Deadline without us having to provide it. You did the same for point caches in Houdini (and I already raised this issue then ynput/OpenPype#4903), I did it myself when I had to spend quite a bit of time to be able to support splitting extraction and rendering for render submissions in Houdini (ynput/OpenPype#5420) - which is when I realized it was pointless to do all of that work if Deadline already had it working for that and a lot of other things it would take me quite a long time to do the same for in OP - and we are doing it here... All of these things work in Deadline, please take advantage of it!!! |
…arm.py Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
…arm.py Co-authored-by: Jakub Trllo <[email protected]>
…ne-submission-on-write-node
@iLLiCiTiT done |
Hello Fabia :) We're doing it at the pace and in the order dictated by client needs. Not only because it is how it's funded but also because it's a better strategy than changing everything at once. Technical debt isn't solved by disrupting the system but by making it evolve... Thank you for the passion you put in this. It helps validate our intentions. But I do hope you will come to understand that we have very different constraints as a multi studio technology than what each studio has in isolation :) |
Refactored render submission process to handle plugins differently, bypassing version validation and incrementing by removing specific plugins from the list.
Changelog Description
This adds a
Render Farm
button to the instance node, next to theRender Local
.To use as much existing code as possible, we publish headless to submit to the farm with the instance from the node and the workfile. There are some slight hacking to point the job submission to a timestamped copy of the workfile.
Testing notes:
ayon+settings://nuke/create/CreateWriteRender/instance_attributes
addRender On Farm
attribute.Render Farm
buttton.