Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Ftrack delete action cause circular error #206

Closed
iLLiCiTiT opened this issue Jun 2, 2020 · 4 comments · Fixed by #1579
Closed

Ftrack delete action cause circular error #206

iLLiCiTiT opened this issue Jun 2, 2020 · 4 comments · Fixed by #1579
Assignees
Labels
type: bug Something isn't working

Comments

@iLLiCiTiT
Copy link
Member

Issue

Ftrack action Delete Asset/Subsets may cause CircularDependencyError. Not sure why is this really happening.

Theory:

Deletion of entity will mark for deletion it's assets -> asset versions -> component and also it's tasks. If task is assigned to same assets as task's parent entity then maybe ftrack api will mark to unset task from that asset which may cause circular error because asset is marked to delete and change in one call. Seems like can be fixed with deletion of tasks first, to avoid this issue. Require testing...

Traceback:

Traceback (most recent call last):
  File "K:\prod\pype-setup/repos/pype/pype/ftrack/actions\action_delete_asset.py", line 555, in launch
      self.session.commit()  File "K:\prod\pype-setup\vendor\python\ftrack-python-api\ftrack_api\session.py", line 1260, in commit
          result = self.call(batch)  File "K:\prod\pype-setup\vendor\python\ftrack-python-api\ftrack_api\session.py", line 1638, in call
              raise ftrack_api.exception.ServerError(error_message)ftrack_api.exception.ServerError: Server reported error: CircularDependencyError(Circular dependency detected. (DeleteState(<AssetVersion at 0x7f58f966c6d0>), DeleteState(<Task at 0x7f58f96d8590>), DeleteState(<FileComponent at 0x7f58f966c1d0>), DeleteState(<Asset at 0x7f58f96d8fd0>)))
@iLLiCiTiT iLLiCiTiT added the type: bug Something isn't working label Jun 2, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@iLLiCiTiT iLLiCiTiT self-assigned this Jul 2, 2020
@create-issue-branch
Copy link

@iLLiCiTiT
Copy link
Member Author

iLLiCiTiT commented Aug 10, 2020

Circular dependency error is still an issue.

Note

Solution may be to delete all Asset entities of deleting entities first.

Traceback

ftrack_api.exception.ServerError: Server reported error: CircularDependencyError(Circular dependency detected. (DeleteState(<Asset at 0x7fc1d85dbe90>), DeleteState(<Asset at 0x7fc1d829b690>), DeleteState(<Task at 0x7fc1d873ca10>), DeleteState(<AssetVersion at 0x7fc1cb827790>), DeleteState(<Task at 0x7fc1d873c950>), DeleteState(<Asset at 0x7fc1d8b4acd0>), DeleteState(<FileComponent at 0x7fc1cba0f250>), DeleteState(<Asset at 0x7fc1d830a750>), DeleteState(<Task at 0x7fc1d873c310>), DeleteState(<FileComponent at 0x7fc1d828a690>), DeleteState(<Task at 0x7fc1d8d75f90>), DeleteState(<FileComponent at 0x7fc1cbb416d0>), DeleteState(<Task at 0x7fc1d873c890>), DeleteState(<Task at 0x7fc1d873c650>), DeleteState(<AssetVersion at 0x7fc1d8d65250>), DeleteState(<FileComponent at 0x7fc1d827d150>), DeleteState(<AssetVersion at 0x7fc1cba0f090>), DeleteState(<AssetVersion at 0x7fc1cb1f02d0>), DeleteState(<FileComponent at 0x7fc1d8112590>), DeleteState(<AssetVersion at 0x7fc1cbed6a50>), DeleteState(<AssetVersion at 0x7fc1d8041e10>), DeleteState(<Task at 0x7fc1d87bd310>), DeleteState(<FileComponent at 0x7fc1d8112c90>), DeleteState(<AssetVersion at 0x7fc1d82f0150>), DeleteState(<FileComponent at 0x7fc1d8d65f50>), DeleteState(<AssetVersion at 0x7fc1d94170d0>), DeleteState(<AssetVersion at 0x7fc1cb96bf50>), DeleteState(<Asset at 0x7fc1d8d75d90>), DeleteState(<AssetVersion at 0x7fc1cbd65b90>), DeleteState(<Asset at 0x7fc1cbd658d0>), DeleteState(<Task at 0x7fc1d87bd650>), DeleteState(<FileComponent at 0x7fc1d80aa950>), DeleteState(<Task at 0x7fc1d873c810>), DeleteState(<AssetVersion at 0x7fc1d82a4c50>), DeleteState(<FileComponent at 0x7fc1d827d650>), DeleteState(<AssetVersion at 0x7fc1d828a710>), DeleteState(<FileComponent at 0x7fc1d8b4a690>), DeleteState(<Asset at 0x7fc1cb7a11d0>), DeleteState(<Task at 0x7fc1d873c5d0>), DeleteState(<Task at 0x7fc1d8d753d0>), DeleteState(<Asset at 0x7fc1cbb41050>), DeleteState(<Task at 0x7fc1d8d75890>), DeleteState(<Asset at 0x7fc1cb7efb10>), DeleteState(<Task at 0x7fc1d873cb50>), DeleteState(<FileComponent at 0x7fc1d9787e90>), DeleteState(<Task at 0x7fc1d87bdf90>), DeleteState(<AssetVersion at 0x7fc1d80aa590>), DeleteState(<AssetVersion at 0x7fc1cb7ef190>), DeleteState(<Asset at 0x7fc1cb8a3850>), DeleteState(<Task at 0x7fc1d8d75790>), DeleteState(<FileComponent at 0x7fc1cb2e7b50>), DeleteState(<FileComponent at 0x7fc1d92cbf10>), DeleteState(<FileComponent at 0x7fc1d943d990>), DeleteState(<AssetVersion at 0x7fc1d8efcf50>), DeleteState(<Asset at 0x7fc1d8e738d0>), DeleteState(<Asset at 0x7fc1d883a590>), DeleteState(<AssetVersion at 0x7fc1d8e52fd0>), DeleteState(<FileComponent at 0x7fc1cb645bd0>), DeleteState(<FileComponent at 0x7fc1d8082790>), DeleteState(<FileComponent at 0x7fc1cb1f0790>), DeleteState(<AssetVersion at 0x7fc1cbb95f90>), DeleteState(<Asset at 0x7fc1cb1f0ad0>), DeleteState(<Asset at 0x7fc1d81e3750>), DeleteState(<Task at 0x7fc1d873c590>), DeleteState(<Asset at 0x7fc1d82d4fd0>), DeleteState(<Task at 0x7fc1d873ced0>), DeleteState(<Asset at 0x7fc1cb850290>), DeleteState(<Asset at 0x7fc1d8fe4d50>)))

@jrsndl
Copy link
Collaborator

jrsndl commented Nov 24, 2020

Hi,
not sure if it helps, but I can confirm I can successfully delete shot with task(s) and even published versions, if I run the Delete action "bottom first, one level at the time".
1st: Select shot, delete, check only versions from the dialog, delete
2nd: Select shot, delete, check only tasks from the dialog, delete
3rd: Select shot, delete

It helped me many times already...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants