Merge ~nteodosio/update-manager:calculation-hang-thread-upper-function into update-manager:main

Proposed by Nathan Teodosio
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 3a4e35fecb709b6180c3fb0bc21d3ed9203517cb
Merged at revision: 43a60e442c15eafd8e63bdc4e0222a5e47211014
Proposed branch: ~nteodosio/update-manager:calculation-hang-thread-upper-function
Merge into: update-manager:main
Diff against target: 384 lines (+142/-110)
2 files modified
UpdateManager/Core/UpdateList.py (+20/-25)
UpdateManager/UpdateManager.py (+122/-85)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Marco Trevisan (Treviño) (community) Approve
Review via email: mp+475707@code.qastaging.launchpad.net

Description of the change

As an alternative to https://code.launchpad.net/~nteodosio/update-manager/+git/update-manager/+merge/470889.

Problem: If thread crashes, how do we get the exception in the callback so that the user can file a bug?

To post a comment you must log in.
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

I'm thinking we could just write it to a file in /tmp and direct point the user to it to file a bug. It's a cheap solution but well it would work.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

(The whole code-base does not seem to log to any file, only stderr, so there is nothing to re-use there.)

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
Revision history for this message
Nathan Teodosio (nteodosio) :
Revision history for this message
Nathan Teodosio (nteodosio) :
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Looks good, some cleanups though and I think you can rebase the branch a bit to avoid refactoring the fixes.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

I applied your suggestion, but I do not understand the benefit of it; Is it that the previous direct number checks (as the GError code) are opaque?

By the way I encountered a critical (see inline comment) when doing basic sanity tests, which I will investigate and only then rebase.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

The reason for the critical was that task.return* functions do not really cause the function to return so it was hitting return_error and then return_value. This is now fixed and as far as I can tell all comments were addressed.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Perfect, thanks!

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks!

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches