Attach the 'allow-incomplete-results' query param to change queries
We attach this parameter to all requests sent from the UI to the
backend. This is a follow up to change I0eacf0576 which implemented it.
This is to make sure that, if we mistakenly wrote bad data to the change
index leaving bad records in an unparseable state, that the back-end
will be able to handle these faulty records.
Tested this by inspecting requests in chrome's developer tool using the
FE dev helper extension.
Google-Bug-Id: b/234334827
Release-Notes: skip
Change-Id: I025efbace70dac364670325c7d27e46d22d9404b
diff --git a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
index 7cb75c6..68d13d9 100644
--- a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
+++ b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
@@ -221,7 +221,7 @@
}
interface QueryChangesParams {
- [paramName: string]: string | undefined | number | string[];
+ [paramName: string]: string | undefined | number | string[] | boolean;
O?: string; // options
S: number; // start
n?: number; // changes per page
@@ -1058,6 +1058,7 @@
if (query && query.length > 0) {
params.q = query;
}
+ params['allow-incomplete-results'] = true;
const request = {
url: '/changes/',
params,