fix(3p/lieer): Work around issues in Google Mail API

There is a temporary issue affecting the retrieval of discovery
documents in the Google Mail API:
https://issuetracker.google.com/issues/160441983

It's possible to work around this by hardcoding the document instead
of retrieving it over the network, as all other API calls still work
as they should.

This does exactly that by generating a patch to apply to lieer, from
the file checked in to the depot with this commit.

This workaround should be reverted once Google has fixed the issue
upstream.

Change-Id: I0063d0bc67753ffa5261c2aa059c7bfd09136ba0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/945
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
This commit is contained in:
Vincent Ambo 2020-07-06 22:30:55 +01:00 committed by tazjin
parent a0f9ae996d
commit 8b58593193
3 changed files with 3836 additions and 0 deletions

View file

@ -26,6 +26,10 @@ let
export PROJECT_ID='${project}'
cat ${./api_client.patch} | ${gettext}/bin/envsubst > $out
'';
discoveryPatch = runCommand "discovery_doc.patch" {} ''
export DISCOVERY_DOC='${./gmail-api.json}'
cat ${./discovery_doc.patch} | ${gettext}/bin/envsubst > $out
'';
in python3Packages.buildPythonApplication rec {
name = "lieer-${version}";
version = "1.0";
@ -39,6 +43,7 @@ in python3Packages.buildPythonApplication rec {
patches = [
authPatch
discoveryPatch
./send_scope.patch
];