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

infra recipes need to install the cmdline-tools component of the Android SDK #82565

Closed
jonahwilliams opened this issue May 14, 2021 · 15 comments
Closed
Assignees
Labels
team-infra Owned by Infrastructure team

Comments

@jonahwilliams
Copy link
Member

jonahwilliams commented May 14, 2021

https://flutter.googlesource.com/recipes/+/refs/heads/master/recipe_modules/android_sdk/api.py

Newer version of Android Studio do not ship with a JDK that can run the old platform-tools sdk manager. In order for the tool to be able to switch, the infra needs to add this component so that the doctor health checks pass.

Blocking #82560 , #80273

@jonahwilliams jonahwilliams added the team-infra Owned by Infrastructure team label May 14, 2021
@jonahwilliams
Copy link
Member Author

I guess this must be updated on cirrus as well

@jonahwilliams
Copy link
Member Author

This is already document in our install requirements here: https://flutter.dev/docs/get-started/install/windows#install-android-studio

@godofredoc
Copy link
Contributor

@jonahwilliams Can you please share the sdkmanager command with version if applicable?

@godofredoc godofredoc self-assigned this May 14, 2021
@jonahwilliams
Copy link
Member Author

We don't require any particular version. probably latest is what you want to pull in

godofredoc added a commit to godofredoc/flutter that referenced this issue May 14, 2021
This is to make the flutter doctor new checks to pass.

Bug: flutter#82565
godofredoc added a commit that referenced this issue May 15, 2021
* Add cmdline tools to docker image.

This is to make the flutter doctor new checks to pass.

Bug: #82565

* Use correct package name.

* Add version to sdkmanager command.
@godofredoc
Copy link
Contributor

@jonahwilliams can you please take a look to see if flutter doctor now passes correctly on Cirrus?

I'm still creating the bundles for LUCI

@jonahwilliams
Copy link
Member Author

Will do, thank you @godofredoc

@godofredoc
Copy link
Contributor

@jonahwilliams LUCI recipes have already been installing tools;1.0 which contains the same tools as cmdline-tools;4.0 I wonder if fixing the issue with the license for android-30 also fixed this issue. Is there a pending PR that I can validate with?

Additionally cmdline-tools changes the location of the binaries from <android_sdk_root >/tools to <android_sdk_root>/cmdline-tools/tools that may require some changes in the flutter tool if the relative path to those binaries is hardcoded.

@jonahwilliams
Copy link
Member Author

i believe there are some places in devicelab where the test scripts poke into the android sdk directly, but the tool already handles looking in either cmdline-tools or tools.

#82560 adds the doctor check and removes a fallback for the old tools, you can use that to verify

@jonahwilliams
Copy link
Member Author

It might be easier to leave the old tools component around until all of the devicelab tests are updated

@godofredoc
Copy link
Contributor

@jonahwilliams the task using #82560 passed but I'm not sure how to validate it is using the new cmdline-tools. Would you mind taking a look? https://chromium-swarm.appspot.com/task?id=53a5dcf88237c110

@jonahwilliams
Copy link
Member Author

If the doctor check passed then it found the tools it needed to find.

@godofredoc
Copy link
Contributor

@godofredoc
Copy link
Contributor

Test on your PR are now passing.

@jonahwilliams
Copy link
Member Author

Excellent!

@github-actions
Copy link

github-actions bot commented Aug 1, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-infra Owned by Infrastructure team
Projects
None yet
Development

No branches or pull requests

2 participants