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

Synchronisation issues #91

Merged
merged 26 commits into from
May 7, 2024
Merged

Synchronisation issues #91

merged 26 commits into from
May 7, 2024

Conversation

jakubjezek001
Copy link
Member

@jakubjezek001 jakubjezek001 commented Apr 24, 2024

Originally this PR had been created for simple fix of following traceback, but during the debugging more issues were found and were also included within the scope of this PR.

Original Traceback:

Traceback (most recent call last):
File "/service/processor/processor.py", line 188, in start_processing
handler.process_event(
File "/service/processor/handlers/shotgrid_event.py", line 42, in process_event
hub.react_to_shotgrid_event(sg_payload["meta"])
File "/service/ayon_shotgrid_hub/__init__.py", line 353, in react_to_shotgrid_event
create_ay_entity_from_sg_event(
File "/service/ayon_shotgrid_hub/update_from_shotgrid.py", line 159, in create_ay_entity_from_sg_event
CUST_FIELD_CODE_ID).lower() == "task" else "folder"
^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'

Other issues:

  • missing ayon id on SG entities - those are created first, so the ID can be used
  • .get("sg_asset_type") needed to be done on sg_ay_dict["data"], not on sg_ay_dict
  • missing self.custom_attribs_types fixed
  • fixing Asset entity synchronization logic
  • removing majority of debug logging since those were overwhelming service container size.
  • rising ayon-python-api version for service_tools
  • disabling status synchronization because that needs to be redesigned
  • adding AssetCategory type creation function as the part of asset entity synch fix
  • streamlining of code for better understanding
  • hub commiting added at the end so we are not commiting after every entity creation/update
  • removing request for getting all projet folders every time asset category entity needs to be checked for existance
  • checking if all entities aer processed via adding processed entity ids, this way we are not looping indefinitelly

@jakubjezek001 jakubjezek001 added type: feature Adding something new and exciting to the product type: bug Something isn't working and removed type: feature Adding something new and exciting to the product labels Apr 24, 2024
…ity creation. Add logging for errors and warnings.
…otgridHub. Refactor attribute types assignment. Improve entity creation based on Shotgrid events, considering asset type and parent entity type for better accuracy.
…r match_shotgrid_hierarchy_in_ayon for efficiency, add debug logs. Create or find AssetCategory in AYON based on ShotGrid entity. Fix create_sg_entities_in_ay function signature and add missing code block in get_asset_category function.
Improve error handling for entity creation and commit_changes.
@jakubjezek001 jakubjezek001 requested a review from fabiaserra May 2, 2024 15:18
@jakubjezek001 jakubjezek001 requested a review from iLLiCiTiT May 2, 2024 15:18
iLLiCiTiT and others added 5 commits May 3, 2024 11:48
Adjust how entities are fetched to avoid duplicate entries. Introduce a dictionary structure for storing entities and iterate through its values instead of directly processing the list returned by the API call.
…sing logic in Shotgrid-related services. Improve error handling and sync status updates.
@jakubjezek001 jakubjezek001 requested a review from fabiaserra May 6, 2024 20:30
in AyonShotgridHub and remove default assignment in update_from_shotgrid.py. Add support for custom attribute types.
@jakubjezek001 jakubjezek001 requested a review from fabiaserra May 7, 2024 09:21
@jakubjezek001 jakubjezek001 requested review from 64qam, iLLiCiTiT and fabiaserra and removed request for fabiaserra May 7, 2024 09:22
@jakubjezek001 jakubjezek001 merged commit b854942 into develop May 7, 2024
@jakubjezek001 jakubjezek001 deleted the bugfix/services_fixes branch May 7, 2024 09:29
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

Successfully merging this pull request may close these issues.

4 participants