Skip to content

[DRAFT] Initial support for Version entities in Entity Hub #158

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

Closed
wants to merge 8 commits into from

Conversation

fabiaserra
Copy link

Start the work required to support Version entities on the Entity Hub so we will be able to update its status or other attributes.

@BigRoy
Copy link

BigRoy commented Jun 4, 2024

Note that you can mark the PR itself as Draft instead of having to put it in the PR title.

Also, this PR seems to include #157 - is that intentional? nvm, fixed with 7c90f0b

@fabiaserra fabiaserra marked this pull request as draft June 4, 2024 21:59
@fabiaserra
Copy link
Author

I will let @iLLiCiTiT comment on how we should proceed with this

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Jun 4, 2024

Version entity lives under product entity. It also does not make much sense to add version without representation entity.

Adding any of that to entity hub also changes how hub operates. As far as I know we don't have any huge need for this feature, and too be honest I don't have spare time for that now. You can try to add it on your own.

@fabiaserra
Copy link
Author

Version entity lives under product entity. It also does not make much sense to add version without representation entity.

Adding any of that to entity hub also changes how hub operates. As far as I know we don't have any huge need for this feature, and too be honest I don't have spare time for that now. You can try to add it on your own.

How are you planning on adding support to sync statuses of Versions across any of the project management tools? Without that version statuses in AYON are useless because people will be expecting to be able to check both databases for ground truth of status, if the one in AYON is not on sync we won't be using it at all and all the places where they see Status in AYON on a version will be distracting and error prone if anyone tries to change it

@fabiaserra
Copy link
Author

The changes done here 7e7ae67 now allow me to sync statuses on the versions in the ayon-shotgrid plugin

@@ -2474,6 +2505,7 @@ def from_entity_data(cls, project, entity_hub):
folder_types=project["folderTypes"],
task_types=project["taskTypes"],
name=project["name"],
statuses=project["statuses"],
Copy link
Author

Choose a reason for hiding this comment

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

I think this was a bug on the existing code missing statuses for the ProjectEntity

Copy link
Member

@iLLiCiTiT iLLiCiTiT Jun 6, 2024

Choose a reason for hiding this comment

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

Yes, looks like the method is not used. Will create separate PR.

@@ -2474,6 +2505,7 @@ def from_entity_data(cls, project, entity_hub):
folder_types=project["folderTypes"],
task_types=project["taskTypes"],
name=project["name"],
statuses=project["statuses"],
attribs=project["ownAttrib"],
Copy link
Author

Choose a reason for hiding this comment

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

@iLLiCiTiT and is this correct? wouldn't it be project["attrib"] instead? and why does ownAttrib not work for the version entity?

Copy link
Member

Choose a reason for hiding this comment

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

Because you set own_attributes=False.

Copy link
Author

Choose a reason for hiding this comment

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

Well like I say on the code, if I set it to True it errors out...

Copy link
Member

Choose a reason for hiding this comment

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

Aaah, I found out that only projects, folders and tasks have ownAttrib will make PR marking the argument deprecated in other methods.

Copy link
Author

Choose a reason for hiding this comment

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

Haha and does that make sense to pass it on as the "attribs" argument on the creator? What would be the equivalent for that for the other entities?

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Jun 6, 2024

How are you planning on adding support to sync statuses of Versions across any of the project management tools?

Well, I guess we never though about syncing versions from other project management. Versions in AYON need product and representations, representations need specific data, how you'll get representation from project management.

@fabiaserra
Copy link
Author

Well, I guess we never though about syncing versions from other project management. Versions in AYON need product and representations, representations need specific data, how you'll get representation from project management.

Until AYON is able to replace a fully production ready project management tool studios will continue to use those. Version management (status, tags, comments...) will continue to happen mostly in the project manager, if that info doesn't get synced across both, one becomes pointless, and given that AYON is the one lacking most of the features... it's easy to know which one will be.

This is not about creating the versions that are misssing in either, but syncing the data of already created versions on both systems. When a version gets created in AYON a version gets created in SG with a link to it. If I then update the status of that version in SG we need to update that in AYON as well. This PR allows me to do exactly that.

Creating versions (and the corresponding product and representations) would be great as well but that's not a must have.

To your question on how do you get representantion from project management? In SG there's the published files linked to a version that correspond to the representations so it would be easy to map that. In ftrack it's the components of the version... it would definitely be possible

@iLLiCiTiT
Copy link
Member

To your question on how do you get representantion from project management? In SG there's the published files linked to a version that correspond to the representations so it would be easy to map that. In ftrack it's the components of the version... it would definitely be possible

I'm not talking about files, I'm talking about the rest of the representation entity data.

This is not about creating the versions that are misssing in either, but syncing the data of already created versions on both systems. When a version gets created in AYON a version gets created in SG with a link to it. If I then update the status of that version in SG we need to update that in AYON as well. This PR allows me to do exactly that.

That still requires ProductEntity.

@fabiaserra
Copy link
Author

I'm not talking about files, I'm talking about the rest of the representation entity data.

Which data? A lot of the data fields are already being set in SG versions, the data that's missing would just be left as default or unset

That still requires ProductEntity.

For what reason? The SG <-> AYON linkage is happening at the version level, I'm updating the version entity directly, what do I need to update on the product?

@iLLiCiTiT
Copy link
Member

Which data? A lot of the data fields are already being set in SG versions, the data that's missing would just be left as default or unset

Representation entity is not just files, random data would make it unusable, but this PR is about versions, ok.

For what reason? The SG <-> AYON linkage is happening at the version level, I'm updating the version entity directly, what do I need to update on the product?

I do understand but the entity hub is now missing an entity inbetween folder and version.

def __init__(
self,
*args,
tags=None,
Copy link
Member

Choose a reason for hiding this comment

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

We should add task_id.

Copy link
Author

Choose a reason for hiding this comment

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

done at 50e75cd

is comment something passed as an attrib?

@fabiaserra
Copy link
Author

Representation entity is not just files, random data would make it unusable, but this PR is about versions, ok.

As long as the id gets created and the paths filled up I don't see why it would be completely unusable (the fact that you say it is it worries me the system is more complex than it needs to be) but anyway, it's not the point of this PR nor my intention yet, this is only to allow syncing ALREADY created versions in both systems.

I do understand but the entity hub is now missing an entity inbetween folder and version.

It's missing quite a lot more than just that haha we can add the missing things as soon as they are needed. The product entity is not needed at all for the SG integration

@iLLiCiTiT
Copy link
Member

It's missing quite a lot more than just that haha we can add the missing things as soon as they are needed. The product entity is not needed at all for the SG integration

I do understand, but that doesn't mean it should not be added.

@fabiaserra
Copy link
Author

I do understand, but that doesn't mean it should not be added.

Yeah I agree it should be added, but not necessarily part of this PR

@iLLiCiTiT
Copy link
Member

Yeah I agree it should be added, but not necessarily part of this PR

It should be added before VersionEntity.

@fabiaserra
Copy link
Author

Yeah I agree it should be added, but not necessarily part of this PR

It should be added before VersionEntity.

Agree to disagree :) it's working fine for me and I'm not missing the product entity at all so I'm not going to work on that to make you guys approve this PR sorry

@mkolar
Copy link
Member

mkolar commented Aug 7, 2024

@iLLiCiTiT we'll soon be starting the work on 2 way full sync for ftrack. Is it worth revisiting this?

@iLLiCiTiT
Copy link
Member

Closing in favor of #197

@iLLiCiTiT iLLiCiTiT closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants