Use SCMTool IDs to look up repositories when possible.
Review Request #13973 — Created June 11, 2024 and submitted
Many versions of Review Board currently have a bug where sending an
unknown value in the tool= parameter to the repository list API would
cause a crash. We'll be shipping a fix for that, but unfortunately there
are a variety of released versions where the Git and ClearCase clients
can trigger this crash on servers that do not have Power Pack installed.This change fixes the RBTools side to not include the Power Pack SCMTool
names, which will avoid the problem for existing servers. For new
servers, we'll be shipping a server-side fix that fixes the crash, adds
the SCMTool IDs to the capabilities, and allows us to pass SCMTool IDs
rather than names to the repository list API. If we see the IDs in the
capability blob, we can assume that we can pass the IDs, including
potentially unknown IDs.This also fixes a problem where we were sometimes accessing the
repository list API twice with exactly the same parameters.
- Ran unit tests.
- Verified that the repository list API was accessed using SCMTool names
that did not include potentially missing ones when running against an
older server. - Verified that the repository list API was accessed with SCMTool IDs
when running against a server with the new API fixes.
Summary | ID |
---|---|
69154c85a7d367a8c6389242b658387b79814d26 |
Description | From | Last Updated |
---|---|---|
Small typo in the description: "Clearcase" -> "ClearCase". |
chipx86 | |
'rbtools.api.capabilities.Capabilities' imported but unused Column: 5 Error code: F401 |
reviewbot | |
'rbtools.api.capabilities.Capabilities' imported but unused Column: 5 Error code: F401 |
reviewbot | |
line too long (80 > 79 characters) Column: 80 Error code: E501 |
reviewbot | |
:py:attr for server_tool_names. |
chipx86 | |
Can we take the opportunity to make this a list of strings? I know we're just passing this to the … |
chipx86 | |
These should be in the same import group. Also, Optional before TYPE_CHECKING. |
chipx86 | |
Missing a return type. |
chipx86 | |
Let's avoid _, since we're using this for gettext in places. Could just do [0] at the end. |
chipx86 | |
whitespace before ',' Column: 55 Error code: E203 |
reviewbot | |
I don't know where we landed on this, but if we're postponing any changes to this format, let's update this … |
chipx86 | |
Here and the other, TYPE_CHECKING sorts before Tuple. |
chipx86 | |
This should be two separate strings. |
chipx86 |
- Commits:
-
Summary ID 0c315187bed7d11eb3072a00087bfc10f8104be5 26ee167ed435deb651643aff6d7d9465d2c2c7b9
Checks run (2 succeeded)
-
-
-
-
Can we take the opportunity to make this a list of strings?
I know we're just passing this to the API, and saving a split/join, but that's pretty inexpensive, and feels like an implementation detail. It'd be nice to have a formal structured definition of what a list of IDs is, so this is more useful going forward outside this one use case.
-
-
-
- Description:
-
Many versions of Review Board currently have a bug where sending an
unknown value in the tool= parameter to the repository list API would cause a crash. We'll be shipping a fix for that, but unfortunately there ~ are a variety of released versions where the Git and Clearcase clients ~ are a variety of released versions where the Git and ClearCase clients can trigger this crash on servers that do not have Power Pack installed. This change fixes the RBTools side to not include the Power Pack SCMTool
names, which will avoid the problem for existing servers. For new servers, we'll be shipping a server-side fix that fixes the crash, adds the SCMTool IDs to the capabilities, and allows us to pass SCMTool IDs rather than names to the repository list API. If we see the IDs in the capability blob, we can assume that we can pass the IDs, including potentially unknown IDs. This also fixes a problem where we were sometimes accessing the
repository list API twice with exactly the same parameters. - Commits:
-
Summary ID 26ee167ed435deb651643aff6d7d9465d2c2c7b9 9d34d25edd1b0f198fea3d0f52e09e63bb400e3d
- Commits:
-
Summary ID 9d34d25edd1b0f198fea3d0f52e09e63bb400e3d 45823b2e84dd8fa8c731335b85c87b1514e6d9bf