[ENG-10365] Make waterbutled callback after addons archiving is finished#11787
[ENG-10365] Make waterbutled callback after addons archiving is finished#11787ihorsokhanexoft wants to merge 2 commits into
Conversation
sh-andriy
left a comment
There was a problem hiding this comment.
archive_callback.si(dst=dst) passes the model instance as a task arg. It survives today because enqueue_task runs this eagerly in the worker (no app context), but it's not broker-safe — default serializer is json, so anything that routes this through apply_async throws EncodeError on the Registration. Rest of the module passes ids for that reason (dst_pk=root._id, job_pk=...). Can we do dst_pk=dst._id and Registration.load(dst_pk) inside the task, matching archive_success?
Also worth a sanity check on timing: archive_addon just fires make_copy_request.delay() and returns, and the target only flips to SUCCESS when WB calls back into the update view. So the chained callback lands while archive_tree_finished() is still False and bails — same as before. Does this actually change the completion path for the stuck-archive case, or just reorder the early no-op?
Ticket
https://openscience.atlassian.net/browse/ENG-10365
Changes
Implement solution from analysis ticket. Here is the issue description and proposed solution:
https://openscience.atlassian.net/browse/ENG-10851?focusedCommentId=121306
Call
archive_callbackonly after all addons are archived