Fix crashes when failing to load hosting services during repo config.

Review Request #12983 — Created April 24, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

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 a HostingService 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.

Commits

Files

    Loading...