aiidalab / aiidalab-widgets-base

Reusable widgets for AiiDAlab applications
MIT License
7 stars 17 forks source link

Recent aiidalab changes broke the github error handler #445

Closed danielhollas closed 1 year ago

danielhollas commented 1 year ago

Recent changes to aiidalab package modified the find_installed_packages functions. Turns out this function is used in the github error handler in AWB.

https://github.com/aiidalab/aiidalab-widgets-base/blob/7a0e266a1576d6a10423931a6821d3f510f4b000/aiidalab_widgets_base/bug_report.py#L22

The error handler now (ironically) excepts with the following;

Error while generating bug report: 'str' object has no attribute 'name'
danielhollas commented 1 year ago

Hmm, this is quite unfortunate. I just realized that would would need to backport this fix to the 1.4.x support branch to fix this in the old Docker stack.

@unkcpz I am wondering if it would be easier to instead change back the find_installed_packages so that it does not break AWB?

unkcpz commented 1 year ago

this fix to the 1.4.x support branch to fix this in the old Docker stack.

That's true, I'll see if I can make it backward-compatible.

unkcpz commented 1 year ago

After some attempts, I think it makes more sense to fix it and backport to 1.4.x. I did try adding a if..else to find_installed_packages function to return different type based on aiida-core version, but then I realize that we remove the aiida-core as the dependency in aiidalab recently.

unkcpz commented 1 year ago

@danielhollas I want to add a test for the fix, can you give https://github.com/aiidalab/aiidalab-widgets-base/pull/435 a look so I can implement unit test directly.