commit | 585b7e8e555a217be32213b8d667421f4c9e729d | [log] [tgz] |
---|---|---|
author | Primiano Tucci <primiano@google.com> | Thu May 14 11:19:10 2020 +0100 |
committer | Primiano Tucci <primiano@google.com> | Thu May 14 11:19:10 2020 +0100 |
tree | 752d7d8109d8b6efb2cbc9e10264fa5597e45cd9 | |
parent | d8cb80d7a786d4896fd1ac22ff35470187d3a933 [diff] |
Use exec(curl) for downloading artifacts Due to the union of an openssl bug, python inconsistencies and Google Cloud changing CA, there doesn't seem to be a way to consistently download an artifact over https in pure python that works both on Linux and Mac (At least for Google HW). On Mac: python3 -c 'import urllib.request; urllib.request.urlopen("https://storage.googleapis.com/")' Fails with CERTIFICATE_VERIFY_FAILED because python3 on mac bundles its own set of CA roots which seems now obsolete (https://bugs.python.org/msg276516) However python2 -c 'from urllib import urlretrieve; urlretrieve("https://storage.googleapis.com/")' works On Linux: python3 -c 'import urllib.request; urllib.request.urlopen("https://storage.googleapis.com/")' Works However python2 -c 'from urllib import urlretrieve; urlretrieve("https://storage.googleapis.com/")' Fails with ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:1946) Because of a bung introduced by OpenSSL 1.1.1e (https://bugs.python.org/issue40018) Other option (like requests) are not viable because require the user to perform some manual actions (pip install...) which is a bad UX The world failed us. exec(curl) to the rescue. Bug: many Test: manually tested both install-build-deps and heap_profile on mac Change-Id: I064c539fd15f7cac87bd0050631c6e008acaff77
Perfetto is an open-source project for performance instrumentation and tracing of Linux/Android/Chrome platforms and user-space apps.
See www.perfetto.dev for docs.
See /docs/contributing.md for instructions.
The source-of-truth repo is Android's Gerrit. The GitHub repo is a read-only mirror.
You can reach us on our Discord channel. If you prefer using IRC we have an experimental Discord <> IRC bridge synced with #perfetto-dev
on Freenode.