Reland change I025efbace70: Attach 'allow-incomplete-results' to queries
This change was reverted in I548cd3aa7b
Backround (copied from the original change):
==========================================
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.
--
Reason for previous revert:
==========================
The original change broke the preloading of change queries. This was
only a soft failure since not preloading dashboard queries can add a
little delta to the latency.
Google-Bug-Id: b/234334827
Release-Notes: skip
Change-Id: Ie0e8ad641bc175658c53bf2f6a3f1dbfce8b99f1
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 65d8fd4..b733d65 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
@@ -1081,7 +1081,7 @@
}
const request = {
url: '/changes/',
- params,
+ params: {...params, 'allow-incomplete-results': true},
reportUrlAsIs: true,
};
return request;
diff --git a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
index dbfef44..b748ba5 100644
--- a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
+++ b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
@@ -104,7 +104,7 @@
{/if}
{/if}
{if $userIsAuthenticated and $defaultDashboardHex and $dashboardQuery}
- <link rel="preload" href="{$canonicalPath}/changes/?O={$defaultDashboardHex}&S=0{for $query in $dashboardQuery}&q={$query}{/for}" as="fetch" type="application/json" crossorigin="anonymous"/>{\n}
+ <link rel="preload" href="{$canonicalPath}/changes/?O={$defaultDashboardHex}&S=0{for $query in $dashboardQuery}&q={$query}{/for}&allow-incomplete-results=true" as="fetch" type="application/json" crossorigin="anonymous"/>{\n}
{/if}
{if $useGoogleFonts}