Update the fake hosting services mapping to use hosting service IDs.

Review Request #14344 — Created Feb. 13, 2025 and updated — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

The repository creation form advertises Power Pack's hosting services,
using fake versions of the hosting services for display. To do this, we
have a mapping of hosting service class paths to fake hosting services.

Power Pack 7 will update the class path for the Bitbucket Server hosting
service. This change updates the fake hosting services mapping to account
for this, otherwise a duplicate entry for Bitbucket Server would appear
in the hosting services choices when creating a repository. Instead of
using class paths in the mapping we use hosting service IDs, which will
show the right hosting services regardless of the Power Pack version,
and regardless of whether any more of their class paths change in the
future.

  • Ran unit tests.
  • Saw that there was no longer a duplicate entry in the hosting services
    choices.
  • Tested with Power Pack 5 and 6.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Update the FakeBitbucketServerHostingService class path.
This updates the path to Power Pack's Bitbucket Server hosting class that is set in the `FakeBitbucketServerHostingService`. This path was changed in Power Pack, so we need to update it here. Otherwise, a duplicate entry for Bitbucket Server would appear in the hosting services choices when creating a repository.
2f62af3f4a32741eee32efd965ddfd8be79956b6 Michelle Aubin
Update the fake hosting services mapping to use hosting service IDs.
The repository creation form advertises Power Pack's hosting services, using fake versions of the hosting services for display. To do this, we have a mapping of hosting service class paths to fake hosting services. Power Pack 6 updates the class path for the Bitbucket Server hosting service. This change updates the fake hosting services mapping to account for this, otherwise a duplicate entry for Bitbucket Server would appear in the hosting services choices when creating a repository. Instead of using class paths in the mapping we use hosting service IDs, which will show the right hosting services regardless of the Power Pack version, and regardless of whether any more of their class paths change in the future.
2db8b71ce80d3230e3b3c03bd1a3e1e1a9d82d54 Michelle Aubin
reviewboard/hostingsvcs/fake.py
reviewboard/scmtools/forms.py
Loading...