Fix crashes when failing to load hosting services during repo config.
Review Request #12983 — Created April 24, 2023 and submitted
Repositories backed by hosting services could crash both the repository
list in the administration UI and the repository configuration form.
Assumptions were being made about whether aHostingService
could be
loaded, and this meant we weren't catching exceptions.The repository list now catches this case when trying to render the
hosting service name, and falls back on showing the stored ID instead,
along with a "(missing support)" suffix.The repository configuration form catches this in a couple of spots as
well, allowing the form to load even if a hosting service can't.There are still problems that can occur with rendering information for
SCMTools, due to the fact that they can be loaded from entrypoints, but
those are beyond the scope of this change.
Tested loading my repository list and config form while Power Pack was
uninstalled. Saw that both pages successfully loaded, and that the
affected repositories had the new suffix.
Summary | ID |
---|---|
0bad98d2e2f44235a65f2a075730165869a1cf49 |
Description | From | Last Updated |
---|---|---|
'typing.TYPE_CHECKING' imported but unused Column: 1 Error code: F401 |
reviewbot | |
undefined name 'Type' Column: 43 Error code: F821 |
reviewbot | |
undefined name 'HostingService' Column: 48 Error code: F821 |
reviewbot | |
undefined name 'HostingService' Column: 39 Error code: F821 |
reviewbot | |
Since you're here, mind adding a module docstring? |
david |
- Change Summary:
-
Fixed missing imports from a bad
git add -p
. - Commits:
-
Summary ID 0db02fb45c8be6ac35c0485102c5e6231d14760d a4dc0413c26cd225793af132e84563393b6bdcda