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

Local render AOVs review frameStartHandle and frameEndHandle fix #77

Closed
wants to merge 7 commits into from

Conversation

timsergeeff
Copy link
Contributor

@timsergeeff timsergeeff commented Aug 26, 2024

Changelog Description

when we create new instances for each aov code forgets to add frameStartHadnle and frame EndHandle for new instance so new representation will not publish

Additional info

My setup was houdini+redhift+animated focal lenght so code fail here
image

Testing notes:

  1. try creating project with animated focal lenght
  2. try to publish
  3. see error
    image

It turns out that code dont parse frameStartHadnle and frame EndHandle data to newly created per aov instance so code fails

@BigRoy BigRoy changed the title frameStartHandle and frameEndHandle to insnace fix Local render AOVs review frameStartHandle and frameEndHandle fix Aug 27, 2024
@BigRoy BigRoy self-assigned this Aug 27, 2024
@BigRoy BigRoy added the type: bug Something isn't working label Aug 27, 2024
@BigRoy BigRoy requested review from MustafaJafar and BigRoy August 27, 2024 09:47
Copy link
Contributor

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

Thanks @timsergeeff

I pushed some code cosmetic changes.

@MustafaJafar can you review whether this fixes the issue?

  1. Ensure you can reproduce the bug without the PR
  2. Ensure this PR fixes the bug and still produces frame ranges and frame range data on the published renders as should be intended.

Note that frameStart and frameEnd include the handles (that was already the case) and handleStart and handleEnd are not propagated to the AOV instances. I have no idea whether rendering to the farm does preserve the "handles" data for renders, but I'm quite sure that local rendering will never use the current folder/task entity's handles even if CollectAssetHandles is enabled for the instance. Even though that would then be an existing bug - it may be worth also testing that now so we can create a follow up issue to track that if it's an issue.

@BigRoy BigRoy requested a review from moonyuet August 27, 2024 21:19
@moonyuet
Copy link
Member

I tested with some weird frame range data.
991 as frame start, 1004 as frame end
1 as handle start and 4 as handle end
The calculation is correct
image
image

@MustafaJafar MustafaJafar added the community Issues and PRs coming from the community members label Aug 28, 2024
@MustafaJafar
Copy link
Contributor

MustafaJafar commented Aug 28, 2024

Side note:
Could you please pick a recommended branch name ?
Although, develop works fine but it's not recommended.

Comment on lines +137 to +139
families = ["render.local.hou"]
if instance.data.get('review'):
families.append("review")
Copy link
Contributor

@MustafaJafar MustafaJafar Aug 28, 2024

Choose a reason for hiding this comment

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

I'm not sure what do these lines fix ?

For information:
CollectLocalRenderInstances was made to mimic what happens on the farm.
if you submitted any render to farm via AYON, check the created json file, you will find that all instances have family review but not all of them have the tag review. and plugins should be able to filter based on the family and the tag.
Here's one from my side mantra_ropTest_metadata.json

Therefore, I'd say let's revert this part.

Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to take over and push into the branch. As maintainer of the repo you should be able to push into the branch of the PR.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I got an error about failed to push.
and got this hint:

hint: Updates were rejected because a pushed branch tip is behind its remote

and I'll avoid any push/pull commands because this PR is from a develop branch!

Copy link
Contributor

Choose a reason for hiding this comment

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

@timsergeeff can you report what issue you faced with the review family still being present for an instance that had instance.data["review"] disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to my testings: wo this code change all of files produced by (in my case) redshift rop will be getting review tag nomatter do i swith review toggle or not because when we create new instance per render product from reddhift_rop family we always tag it as review so even if i have several rops and only one with review turn on we get all products from all rops to have revirew and in my case i have a ton of posts in kitsu from all redhist rops

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and I'll avoid any push/pull commands because this PR is from a develop branch!

sorry git is pretty new for me how can i change branch and what exactley is a problem? (just for my future understanding)

Copy link
Contributor

Choose a reason for hiding this comment

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

According to my testings: wo this code change all of files produced by (in my case) redshift rop will be getting review tag nomatter do i swith review toggle or not because when we create new instance per render product from reddhift_rop family we always tag it as review so even if i have several rops and only one with review turn on we get all products from all rops to have revirew and in my case i have a ton of posts in kitsu from all redhist rops

@MustafaJafar can you test this scenario and figure out what is causing that instead? Is it that Kitsu logic may be disregarding whether representations have a 'review' tag? or?

Also, to me personally the code that @timsergeeff makes sense - why would it need review family if instance.data["review"] = False is what I wonder.

Copy link
Contributor

@MustafaJafar MustafaJafar Sep 3, 2024

Choose a reason for hiding this comment

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

According to my testings: wo this code change all of files produced by (in my case) redshift rop will be getting review tag nomatter do i swith review toggle or not because when we create new instance per render product from reddhift_rop family we always tag it as review so even if i have several rops and only one with review turn on we get all products from all rops to have revirew and in my case i have a ton of posts in kitsu from all redhist rops

As I've mentioned earlier #77 (comment).
I'm only matching the results of the farm scripts, and please check the provided json file. and I believe it deserves its own PR because this PR was made to solve a particular issue.

FYI, we have review family and review tag..
I don't know why farm publishing add review family to all of the AOVs. but that's totally a different issue in my opinion.

Copy link
Contributor

@MustafaJafar MustafaJafar Sep 3, 2024

Choose a reason for hiding this comment

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

and I'll avoid any push/pull commands because this PR is from a develop branch!

sorry git is pretty new for me how can i change branch and what exactley is a problem? (just for my future understanding)

you need to create a new branch. but maybe next time. please refer to PR name recommendations https://community.ynput.io/t/i-m-new-to-ayon-where-to-start/1070#how-to-collaborate-as-a-developer-14

Copy link
Contributor

@MustafaJafar MustafaJafar Sep 3, 2024

Choose a reason for hiding this comment

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

for reference, it should actually be as the suggestion below, similar to setting the review tag in the plugin.
keep in mind instance.data.get('review') will still add the review family for all the AOV instances. unlike the preview variable should only pick the AOVs that follows the regex pattern specified in the settings.

Suggested change
families = ["render.local.hou"]
if instance.data.get('review'):
families.append("review")
families = ["render.local.hou"]
if preview:
families.append("review")

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

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

Adding frameStartHandle and frameEndHandle works.

For reference:
There's also an alternative fix to add a fallback value here in CollectHoudiniReviewData.

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

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

Could we apply these changes ?

Comment on lines +137 to +139
families = ["render.local.hou"]
if instance.data.get('review'):
families.append("review")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
families = ["render.local.hou"]
if instance.data.get('review'):
families.append("review")

"productType": product_type,
"family": product_type,
"productName": product_name,
"productGroup": product_group,
"families": ["render.local.hou", "review"],
"families": families,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"families": families,
"families": ["render.local.hou", "review"],

Copy link
Contributor Author

@timsergeeff timsergeeff Aug 28, 2024

Choose a reason for hiding this comment

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

sorry i dont get it why we dont want peview toggle to work?
or maybe we need to be in separate PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

We do want the behavior to work - the question is whether your fix is the 'correct' approach to resolving it or that it's maybe hiding another issue in another area.

Copy link
Contributor Author

@timsergeeff timsergeeff Aug 29, 2024

Choose a reason for hiding this comment

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

ohh sorry now i see

but i feel like transfering families cant be bad or worse then hardcoding them

and i understand that somewhere we have tags but as someone that thee mount in setting everything up i met tags so rare (maybt i'm just dumb haha) but famalies is everywhere so kitsu just ignoring tags and using unly familyes as i remember when i was digging in collect kitsu family

Copy link
Contributor

Choose a reason for hiding this comment

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

If that's the case in Kitsu - then admittedly the bug is in Kitsu. Because there may be multiple representations of which only one is a reviewable - in such case the other should still be ignored. ;)

Anyway, PRs to Kitsu are welcome if you know how to fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i want to add product name filtering! but i think that here changes i make nessasry to be here because why do we need families that was not in original instance?

@MustafaJafar
Copy link
Contributor

Hey, @timsergeeff
Thanks a lot for your contribution.
I'm closing this PR in favor of another PR #93 I've just created which pick few commits from your PR (which keeps your contribution to the repo)..
Regarding the issue of the review family, we still need a debug session to

  1. Explore potential bugs that resultant of having the additional review family.
  2. Explore potential solutions.
  3. Test that locally and on farm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues and PRs coming from the community members type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants