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

Publisher: Fix stop of publishing #847

Merged
merged 10 commits into from
Aug 26, 2024
Merged

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Aug 19, 2024

Changelog Description

Fixed issues related to stopped/paused publishing.

Additional info

The issue was introduced with #689 . When publishing was paused it could happen that the publishing loop was added to main process items more than once, in that case there were 2 running loops of plugin processing, leading to triggering the process loops more than once at the end.

Traceback

Traceback (most recent call last):
  File "../ayon-core/client/ayon_core/tools/publisher/control_qt.py", line 52, in _execute
    item.process()
  File "../ayon-core/client/ayon_core/tools/publisher/control_qt.py", line 20, in process
    self.callback(*self.args, **self.kwargs)
  File "../ayon-core/client/ayon_core/tools/publisher/control_qt.py", line 95, in _next_publish_item_process
    func = self._publish_model.get_next_process_func()
  File "../ayon-core/client/ayon_core/tools/publisher/models/publish.py", line 918, in get_next_process_func
    item = next(self._main_thread_iter)
StopIteration

Testing notes:

I could not replicate the issue in traypublisher, so it requires to test in DCCs (could be replicated in nuke, maya, houdini).

  1. Open DCC of your choice.
  2. Open publisher.
  3. Start publishing with validate button, or start publishing and stop it via Stop button.
  4. Continue publishing with Publish button.
  5. Check output (in script editor or console, based on DCC).
  6. There should not be traceback similar to traceback above.

@iLLiCiTiT iLLiCiTiT added the type: bug Something isn't working label Aug 19, 2024
@ynbot ynbot added the size/XS label Aug 19, 2024
@iLLiCiTiT iLLiCiTiT changed the title Publisher: Added default iterator on publisher initialization Publisher: Fix stop of publishing Aug 25, 2024
@iLLiCiTiT iLLiCiTiT requested a review from BigRoy August 25, 2024 09:38
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

The issue of this error:

Traceback (most recent call last):
  File "E:\dev\ayon-core\client\ayon_core\tools\publisher\control_qt.py", line 52, in _execute
    item.process()
  File "E:\dev\ayon-core\client\ayon_core\tools\publisher\control_qt.py", line 20, in process
    self.callback(*self.args, **self.kwargs)
  File "E:\dev\ayon-core\client\ayon_core\tools\publisher\control_qt.py", line 95, in _next_publish_item_process
    func = self._publish_model.get_next_process_func()
  File "E:\dev\ayon-core\client\ayon_core\tools\publisher\models\publish.py", line 930, in get_next_process_func
    item = next(self._main_thread_iter)
StopIteration

Upon validate, and then after continuing the publish is gone. I was unable to reproduce that error so this seems to be completely functional and fix the issue.

I tested in Maya 2024, Blender 4.2, Houdini 20.0.724 and Fusion 18. All good.
Resetting publisher, and republishing also seems to work.


I did a quick read over the code but it was a bit hard to grasp how and why this fixes it - so I couldn't say much about that. Sorry! ⚠️

@iLLiCiTiT iLLiCiTiT merged commit 6a07de6 into develop Aug 26, 2024
1 check passed
@iLLiCiTiT iLLiCiTiT deleted the bugfix/default-publish-iterator branch August 26, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants