-
Notifications
You must be signed in to change notification settings - Fork 10
[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
Conversation
I will let @iLLiCiTiT comment on how we should proceed with this |
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 |
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"], |
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 think this was a bug on the existing code missing statuses
for the ProjectEntity
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.
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"], |
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.
@iLLiCiTiT and is this correct? wouldn't it be project["attrib"]
instead? and why does ownAttrib
not work for the version entity?
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.
Because you set own_attributes=False
.
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.
Well like I say on the code, if I set it to True it errors out...
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.
Aaah, I found out that only projects, folders and tasks have ownAttrib
will make PR marking the argument deprecated in other methods.
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.
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?
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 |
I'm not talking about files, I'm talking about the rest of the representation entity data.
That still requires |
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
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? |
Representation entity is not just files, random data would make it unusable, but this PR is about versions, ok.
I do understand but the entity hub is now missing an entity inbetween folder and version. |
ayon_api/entity_hub.py
Outdated
def __init__( | ||
self, | ||
*args, | ||
tags=None, |
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.
We should add task_id
.
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 at 50e75cd
is comment
something passed as an attrib
?
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.
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. |
Yeah I agree it should be added, but not necessarily part of this PR |
It should be added before |
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 |
@iLLiCiTiT we'll soon be starting the work on 2 way full sync for ftrack. Is it worth revisiting this? |
Closing in favor of #197 |
Start the work required to support
Version
entities on the Entity Hub so we will be able to update its status or other attributes.