Closed Bug 1376306 Opened 7 years ago Closed 7 years ago

Upgrade to Java 1.8 in Android toolchain

Categories

(Firefox Build System :: Android Studio and Gradle Integration, enhancement)

enhancement
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(2 files)

We're lagging at 1.7 on the build machines.  This is required for newer Android build-tools, where Proguard and the Lint JARs are produced with javac 1.8 and can't be consumed by javac 1.7.

I'm separating this from Bug 1366644 in order to not upgrade _everything_ at once.
Blocks: 1370119
Blocks: 1344244
The fallout from trying to use Google's newer Android SDK tools continues.  Bug 1344244 made |mach bootstrap| for mobile/android use the new sdkmanager tool... which requires Java 1.8.  I didn't notice locally or in my testing 'cuz my VMs, etc, were using Java 1.8 or were on top of work-in-progress that updated the toolchain to Java 1.8.

The error manifests as:

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/SdkManagerCli : Unsupported major.minor version 52.0

Since we want to upgrade to Java 1.8 in general, I'm putting this here rather than filing a "fix |mach bootstrap|" ticket.
The system works!  My private artifact at https://queue.taskcluster.net/v1/task/Kq3D_3hhTvqOEk3TQSWeyQ/runs/0/artifacts/private/java_home/java_home.tar.xz is protected!  That's good.  What's not good is that I don't know how to give myself (or other people) the scope to download the private artifact, which is "queue:get-artifact:private/java_home/java_home.tar.xz".  In fact there are multiple private artifacts, so I'll need to get access to a few different scopes.

dustin: you suggested using private/ in the first place.  How do I get these scopes?  How do I give them to other people (Android peers who might want to package new Java toolchains and new Android SDK toolchains)?

garndt: you might know that as well.

Thanks!
Flags: needinfo?(garndt)
Flags: needinfo?(dustin)
moco employees should have the right ldap group that allows them to assume this role and download the artifacts under private/*: https://tools.taskcluster.net/auth/scopes/queue%3Aget-artifact%3Aprivate%2F*/role:mozilla-group%3Ateam_moco

If this needs to be expanded to those not in the team_moco ldap group, we probably need to setup a role for this project and assign that to the ldap login for those users I think (dustin can correct me if I'm wrong)

Also, I wonder if we want this under private/* or if we want to have a project based namespace for these artifacts.  Might not matter for the java/android toolchains.  I assume this is prevent redistribution of the tools.
Flags: needinfo?(garndt)
We talked about where to put the artifact, and yeah -- the key is to prevent redistribution, so exactly who has access isn't important as long as it's not "everybody".  So private/ makes sense.
Flags: needinfo?(dustin)
garndt: dustin: thanks for replying!

If I download from the Job Details pane in Tree Herder, I get rejected.  If I navigate to the "Task" and then the "Artifacts" pane (ending up at https://tools.taskcluster.net/groups/T4zntEe6TqSATUzr4-LcEg/tasks/Kq3D_3hhTvqOEk3TQSWeyQ/runs/0/artifacts), I can download \o/

(I was logged into Task Cluster the entire time.)

So I think this has to do with domains, login cookies, and cross-site requests.  Perhaps there's a Tree Herder papercut in this flow?

In any case... I got the artifacts \o/
I think Treeherder needs to learn how to access private artifacts.
Comment on attachment 8891014 [details]
Bug 1376306 - Bootstrap and upload java_home.tar.xz; bump Java to 1.8.

https://reviewboard.mozilla.org/r/162200/#review167506

I have the same question here: will it make snse to turn this into a toolchain task and depend on it in the tasks that need it?
Attachment #8891014 - Flags: review?(dustin) → review+
Comment on attachment 8891014 [details]
Bug 1376306 - Bootstrap and upload java_home.tar.xz; bump Java to 1.8.

https://reviewboard.mozilla.org/r/162200/#review167942
Attachment #8891014 - Flags: review?(s.kaspari) → review+
Comment on attachment 8891015 [details]
Bug 1376306 - Use new Android SDK and Java 1.8 tooltool toolchains.

https://reviewboard.mozilla.org/r/162202/#review167944
Attachment #8891015 - Flags: review?(s.kaspari) → review+
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f497b6194e9f
Bootstrap and upload java_home.tar.xz; bump Java to 1.8. r=dustin,sebastian
https://hg.mozilla.org/integration/autoland/rev/33c43d6eea63
Use new Android SDK and Java 1.8 tooltool toolchains. r=sebastian
Depends on: 1275423
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/616afd45b6e3
Update tests to reflect new Java version requirement; r=me
https://hg.mozilla.org/mozilla-central/rev/f497b6194e9f
https://hg.mozilla.org/mozilla-central/rev/33c43d6eea63
https://hg.mozilla.org/mozilla-central/rev/616afd45b6e3
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
This can't have impacted talos on linux64.
No longer depends on: 1390824
Assignee: nobody → nalexander
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 56 → mozilla56
You need to log in before you can comment on or make changes to this bug.