in bot/code_coverage_bot/uploader.py [0:0]
def gcp_ingest(repository, revision, platform, suite):
"""
The GCP report ingestion is triggered remotely on a backend
by making a simple HTTP request on the /v2/path endpoint
By specifying the exact new revision processed, the backend
will download automatically the new report.
"""
params = {"repository": repository, "changeset": revision}
if platform:
params["platform"] = platform
if suite:
params["suite"] = suite
backend_host = secrets[secrets.BACKEND_HOST]
logger.info(
"Ingesting report on backend",
host=backend_host,
repository=repository,
revision=revision,
platform=platform,
suite=suite,
)
resp = requests.get("{}/v2/path".format(backend_host), params=params)
resp.raise_for_status()
logger.info("Successfully ingested report on backend !")
return resp