Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate pinning Android SDK components inside CI #59778

Closed
pietroalbini opened this issue Apr 7, 2019 · 0 comments · Fixed by #59926
Closed

Investigate pinning Android SDK components inside CI #59778

pietroalbini opened this issue Apr 7, 2019 · 0 comments · Fixed by #59926
Labels
P-medium Medium priority T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@pietroalbini
Copy link
Member

We already had at least two different CI issues caused by the Android SDK's sdkmanager:

The root cause of those issues is that sdkmanager doesn't support any kind of pinning (as far as I can tell), and any change Google makes can break our CI.

Should we develop a pinning mechanism and use it for all the Android SDK components?

cc @rust-lang/infra

@pietroalbini pietroalbini added I-nominated T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. P-medium Medium priority and removed I-nominated labels Apr 7, 2019
bors added a commit that referenced this issue Apr 15, 2019
ci: use a custom android sdk manager with pinning and mirroring

Google's own sdkmanager has two issues that make it unsuitable for us:

* Mirroring has to be done manually, which is annoying because we need to figure out on our own all the URLs to copy (I couldn't find any documentation when building this PR, had to use mitmproxy).
* There is no support for pinning, which means an update on Google's side can break our CI, as it happened multiple times.

This PR replaces all our usage of sdkmanager with a custom Python script which mimics its behavior, but with the two issues fixes.

sdkmanager's logic for installing packages is thankfully very simple: the package name (like `system-images;android-18;default;armeabi-v7a`) is the directory where the package should live (with `;` replaced with `/`), so to install a package we only need to extract its contents in the right directory.

r? @alexcrichton
cc @kennytm
fixes #59778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant