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

Get outdated logic fails on any invalid ids, for example from OpenPype #476

Closed
2 tasks done
BigRoy opened this issue Apr 30, 2024 · 5 comments
Closed
2 tasks done
Assignees
Labels
type: bug Something isn't working

Comments

@BigRoy
Copy link
Collaborator

BigRoy commented Apr 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior:

The check whether there are any outdated containers in the scene fails if there happens to be any invalid ids found, like e.g. ids coming from OpenPype instead of AYON.

Expected Behavior:

The invalid IDs should be ignored, similar to how manager may display it as "NOT FOUND" and alike.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Set up an invalid id on a container that is not allowed for the graphql query, for example 6537996102bcba09068baf0a
  2. The get invalid query should ignore the invalid entry instead of crashing the query.

Are there any labels you wish to add?

  • I have added the relevant labels to the bug report.

Relevant log output:

# Warning: EventCallback : Failed to execute event callback < EventCallback - on_open > E:\dev\ayon-core\client\ayon_core\hosts\maya\api\pipeline.py
# Traceback (most recent call last):
#   File "E:\dev\ayon-core\client\ayon_core\lib\events.py", line 339, in process_event
#     callback()
#   File "E:\dev\ayon-core\client\ayon_core\hosts\maya\api\pipeline.py", line 653, in on_open
#     if any_outdated_containers():
#   File "E:\dev\ayon-core\client\ayon_core\pipeline\load\utils.py", line 790, in any_outdated_containers
#     if get_outdated_containers(host, project_name):
#   File "E:\dev\ayon-core\client\ayon_core\pipeline\load\utils.py", line 817, in get_outdated_containers
#     return filter_containers(containers, project_name).outdated
#   File "E:\dev\ayon-core\client\ayon_core\pipeline\load\utils.py", line 870, in filter_containers
#     for repre_entity in repre_entities:
#   File "C:\Program Files\Ynput\AYON 1.0.2\dependencies\ayon_api\server_api.py", line 5058, in get_representations
#     for parsed_data in query.continuous_query(self):
#   File "C:\Program Files\Ynput\AYON 1.0.2\dependencies\ayon_api\graphql.py", line 380, in continuous_query
#     raise GraphQlQueryFailed(
# ayon_api.exceptions.GraphQlQueryFailed: GraphQl query Failed: Invalid entity ID 6537996102bcba09068baf0a on item 'project/representations' (Line 3 Column 5)

Additional context:

No response

@BigRoy BigRoy added the type: bug Something isn't working label Apr 30, 2024
@BigRoy
Copy link
Collaborator Author

BigRoy commented Apr 30, 2024

@iLLiCiTiT any good ideas how we could best approach this?

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Apr 30, 2024

Do we know all places where it's used that way? Because I'm afraid those are arbitrary and best would be to filter them in host integration instead of places where are used... Talking about UIs, yes we can handle it, but what about other usages?

For host integrations inheriting HostBase we could make a wrapper aroung get_containers, but I guess that some of them are still using something like ls out of the class definition for inner logic.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Apr 30, 2024

Well, the tricky thing is. They should be returned by get_containers so they can be represented in the manager by the "not found" entries in the UI.

As for, where this applies. Hard to tell, but here's another one:

# Traceback (most recent call last):
#   File "E:\dev\ayon-core\client\ayon_core\tools\sceneinventory\view.py", line 473, in _process_custom_action
#     result = action.process(containers)
#   File "E:\dev\ayon-core\client\ayon_core\hosts\maya\plugins\inventory\rig_recreate_animation_instance.py", line 32, in process
#     contexts_by_repre_id = get_representation_contexts_by_ids(
#   File "E:\dev\ayon-core\client\ayon_core\pipeline\load\utils.py", line 220, in get_representation_contexts_by_ids
#     repre_entities_by_id = {
#   File "E:\dev\ayon-core\client\ayon_core\pipeline\load\utils.py", line 220, in <dictcomp>
#     repre_entities_by_id = {
#   File "C:\Program Files\Ynput\AYON 1.0.2\dependencies\ayon_api\server_api.py", line 5058, in get_representations
#     for parsed_data in query.continuous_query(self):
#   File "C:\Program Files\Ynput\AYON 1.0.2\dependencies\ayon_api\graphql.py", line 380, in continuous_query
#     raise GraphQlQueryFailed(
# ayon_api.exceptions.GraphQlQueryFailed: GraphQl query Failed: Invalid entity ID 6537996102bcba09068baf0a on item 'project/representations' (Line 3 Column 5)

For the recreate animation instance action in the scene manager.

I've hit this issue in a few other areas as well, which is I passed by pre-filtering the API call by only querying for valid uuid strings.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Apr 30, 2024

I'm also dealing with some issues where the publisher UI just won't refresh, doesn't log any errors and I can't publish. Usually starting from a "update products" button that shows, and after that just nothing works anymore. I need to restart Maya for the publisher to become functional again. This also occurs in a scene with these invalid IDs and I wonder whether it may be related.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Sep 17, 2024

This has been solved with the invalid id check here for some time. I haven't faced issues with this recently so will close it.

@BigRoy BigRoy closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants