Skip to content
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

Add publish families to cache creators #149

Closed

Conversation

MustafaJafar
Copy link
Contributor

@MustafaJafar MustafaJafar commented Oct 29, 2024

Changelog Description

This PR

  • adds publish families to cache creators.
  • removes unnecessary collector.
  • implements callbacks to cachesize collector to make its attribute visible if farm is enabled

Note

This PR is mainly made for sharing code and show a use case for ynput/ayon-core#994
It should be used along ynput/ayon-deadline#49 and ynput/ayon-deadline#54
Here's what to expect when using the three PRs togther
Animation_17

Testing notes:

  1. Launch Houdini via AYON
  2. Create a cache instance (vdb, model, pointcache, ass, rsproxy)
  3. Switch farm toggle in the publisher UI, click save, click refresh and watch the attributes appear and disappear.

@MustafaJafar MustafaJafar requested a review from BigRoy November 12, 2024 15:18
Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did simple test on this, it is submitted to the farm successfully
image
Are we gonna wait for the merge of this PR #171 ? Or there should be something needed to be working on as I see this PR is still a draft?

@MustafaJafar
Copy link
Contributor Author

MustafaJafar commented Nov 13, 2024

Are we gonna wait for the merge of this PR #171 ?

Both are separate PRs. they don't depend on each other.
edit: oh, let me revert changes in the chunksize collector as it'll be removed by #171 and that collector has no effect anyways.

@MustafaJafar
Copy link
Contributor Author

I can still submit to deadline when I'm on this PR but having publish.hou family in get_publish_families has a downside, that deadline plugins will still be triggered even if I don't have farm enabled.

This plugin shouldn't be triggered when disabling submit to farm.
image

@MustafaJafar
Copy link
Contributor Author

This PR shouldn't add the intermediate publish family publish.hou used for submitting to deadline.
as it will always assume they are farm instances.

@BigRoy
Copy link
Contributor

BigRoy commented Nov 16, 2024

Actually @MustafaJafar - I think it is up to the creators to do so. This PR wasn't too far off, it should just be more dynamic.

As soon as you toggle (on the creator) to submit it to the farm or not - then the relevant families should be added if set to farm.
Then on the deadline plug-in it should respond to changes on instance["families"] so that if the farm.publish (or "publish.hou" if you prefer that naming) job is not set that it's not active.

That way the attributes are still completely aligned with the instance's family.

@MustafaJafar
Copy link
Contributor Author

Is that achieved by implementing a callback that listens to the value change and assigns the family ?

@BigRoy
Copy link
Contributor

BigRoy commented Nov 16, 2024

Is that achieved by implementing a callback that listens to the value change and assigns the family ?

Correct - value change callback on the creator which adds/removes the farm related family based on the enum's state.

One could approach it the opposite so that all this logic is in the Deadline plug-in to watch for creator attribute changes, however that means it's up to that plug-in to detect whether "farm is enabled" on the attribute which makes it harder to maintain over time if we want to expose the toggle in the creator a different way. Or like add a different additional toggle or whatever. Plus one would then need to duplicate that logic to ALL farm integrations (if there were more than Deadline) and hence it'd mean more maintenance, instead of all integrations just watching for some farm.publish family for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants