Closed Bug 1207986 Opened 6 years ago Closed 6 years ago

Add Java openjdk to phone-builder docker image

Categories

(Taskcluster Graveyard :: Docker Images, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla44

People

(Reporter: wcosta, Assigned: wcosta)

References

Details

User Story

Aries FOTA depends on openjdk for successful builds.

Attachments

(3 files, 4 obsolete files)

No description provided.
This package is necessary to build Aries fota updates.
Attachment #8665344 - Flags: review?(garndt)
Attachment #8665344 - Flags: feedback?(lissyx+mozillians)
Comment on attachment 8665344 [details] [diff] [review]
Add java-openjdk package to phone-builder image. r=garndt

Review of attachment 8665344 [details] [diff] [review]:
-----------------------------------------------------------------

Well, that looks obviously trivial and good :)

Ping me when it is landed and available, I'll update my patch in bug 1201540 and we will check :)
Attachment #8665344 - Flags: feedback?(lissyx+mozillians) → feedback+
Attachment #8665344 - Flags: review?(garndt) → review+
https://hg.mozilla.org/mozilla-central/rev/a515a700781a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This had to be backed out for Flake and Aries build bustages.
Target Milestone: mozilla44 → ---
Attachment #8665344 - Attachment is obsolete: true
This is necessary for Aries builders. Increase the version number to
0.0.22 because 0.0.21 was busted.
Attachment #8665880 - Flags: review?(garndt)
Naoki,

Could you please test this new image and make sure it is working?
Flags: needinfo?(nhirata.bugzilla)
(In reply to Wander Lairson Costa [:wcosta] from comment #9)
> Naoki,
> 
> Could you please test this new image and make sure it is working?

I am giving it a try here:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bd0dbec46d59
(In reply to Alexandre LISSY :gerard-majax from comment #10)
> (In reply to Wander Lairson Costa [:wcosta] from comment #9)
> > Naoki,
> > 
> > Could you please test this new image and make sure it is working?
> 
> I am giving it a try here:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=bd0dbec46d59

Sorry, I missed to add the script. That one should be better:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e753936407fc
Comment on attachment 8665880 [details] [diff] [review]
Install openjdk in the phone builder docker image. r=garndt

Review of attachment 8665880 [details] [diff] [review]:
-----------------------------------------------------------------

I think maybe we could figure out a way to include these safeguards within the original phone-builder/build.sh script rather than having another means of building the docker image.  Thanks for working on this.  Assuming builds are green, and Naoki confirms, I think we're ok.

::: testing/docker/build-phone-builder.sh
@@ +1,3 @@
> +#!/bin/bash
> +
> +./build.sh phone-builder -i $AWS_ACCESS_KEY_ID -k $AWS_SECRET_ACCESS_KEY -s $SOCORRO_TOKEN

So after talking on IRC what we're trying to prevent is A) the wrong variables getting passed in when manually typing on the command line B) ensuring all the variables are set...


So phone-builder/build.sh could first set from environment variables if present, and then process the command line arguments in case someone wanted to override those.

What do you think?
Attachment #8665880 - Flags: review?(garndt) → review+
Still failing: 

> IOError: [Errno 2] No such file or directory: '/home/worker/workspace/gecko/testing/taskcluster/scripts/phone-builder/oauth.txt'
(In reply to Alexandre LISSY :gerard-majax from comment #13)
> Still failing: 
> 
> > IOError: [Errno 2] No such file or directory: '/home/worker/workspace/gecko/testing/taskcluster/scripts/phone-builder/oauth.txt'

Okay, output is confusing and Wander spotted an error in my patch. New try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=457a38e7c558
Attachment #8665880 - Attachment is obsolete: true
For any parameter we don't pass in the command line, take from the
environment.
This is necessary for FOTA builds. Increase the version number
to
0.0.22 because 0.0.21 was busted.
Comment on attachment 8665991 [details] [diff] [review]
part1: turn phone-builder cmd line parameters optional. r=garndt

You can now build phone-builder with:

./build.sh phone-builder

If you have environment correctly setup.
Attachment #8665991 - Flags: review?(garndt)
Attachment #8665992 - Flags: review?(garndt)
Comment on attachment 8665991 [details] [diff] [review]
part1: turn phone-builder cmd line parameters optional. r=garndt

Review of attachment 8665991 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8665991 - Flags: review?(garndt) → review+
Comment on attachment 8665992 [details] [diff] [review]
part2: Install openjdk in the phone builder docker image. r=garndt

Review of attachment 8665992 [details] [diff] [review]:
-----------------------------------------------------------------

This seems simple enough change, but like always, I would suggest that both of these patches be pushed to try to make sure builds are green.
Attachment #8665992 - Flags: review?(garndt) → review+
(In reply to Alexandre LISSY :gerard-majax from comment #14)
> (In reply to Alexandre LISSY :gerard-majax from comment #13)
> > Still failing: 
> > 
> > > IOError: [Errno 2] No such file or directory: '/home/worker/workspace/gecko/testing/taskcluster/scripts/phone-builder/oauth.txt'
> 
> Okay, output is confusing and Wander spotted an error in my patch. New try:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=457a38e7c558

And that's green for me!
This is necessary for FOTA builds. Increase the version number
to
0.0.22 because 0.0.21 was busted.
Attachment #8666207 - Attachment is obsolete: true
As the aws command line tool call is piped, its status is lost, but the
net result is an empty variable assigment. We take advantage of this to
detect errors in the aws tool.
Comment on attachment 8666209 [details] [diff] [review]
part 3: Exit script if aws fails to list backup file. r=garndt

https://treeherder.mozilla.org/#/jobs?repo=try&revision=ef096d2f393e
Attachment #8666209 - Flags: review?(garndt)
Comment on attachment 8666209 [details] [diff] [review]
part 3: Exit script if aws fails to list backup file. r=garndt

Review of attachment 8666209 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, just one minor nit.  We probably should also test this on a bad image (one without the credentials to make sure it's caught.

::: testing/taskcluster/scripts/phone-builder/pre-build.sh
@@ +37,5 @@
>      aws s3 cp s3://b2g-phone-backups/$TARGET/$backup_file .
>      tar -xjf $backup_file -C $WORKSPACE/B2G
>      rm -f $backup_file
> +else
> +    echo "The backup file is invalid"

Perhaps "The back up file is either invalid or missing.  Check to make sure that the backup file exists and the credentials are correct"  Some kind of error that might indicate that the person's credentials are wrong and that's why the backup is missing.
Attachment #8666209 - Flags: review?(garndt) → review+
Attachment #8666209 - Attachment is obsolete: true
As the aws command line tool call is piped, its status is lost, but the
net result is an empty variable assigment. We take advantage of this to
detect errors in the aws tool.
Comment on attachment 8666692 [details] [diff] [review]
part 3: Exit script if aws fails to list backup file. r=garndt

Example of failed build:
https://tools.taskcluster.net/task-inspector/#yMXwjqs0SMODyEd5w_4j3Q/0
Attachment #8666692 - Flags: review?(garndt)
Attachment #8666692 - Flags: review?(garndt) → review+
https://tools.taskcluster.net/task-inspector/#W2Pwkz23QdCrCeOvCRL5fA/2 is a fresh trial run w/ FOTA.  Waiting for results.

I was able to make a build on friday.
I backed out patch 3 because it broke nexus builds.
https://hg.mozilla.org/integration/b2g-inbound/rev/f44e5e1fa462
FYI, you will need this bug to be fixed in order to make the aries FOTA builds appropriately on taskcluster.
Flags: needinfo?(nhirata.bugzilla) → needinfo?(bhearsum)
Flags: needinfo?(nhirata.bugzilla)
https://hg.mozilla.org/mozilla-central/rev/7dfbea429d10
https://hg.mozilla.org/mozilla-central/rev/d07a9b304730
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Flags: needinfo?(bhearsum)
Tested the builds when asked by Wander.  clearing ni on myself.
Flags: needinfo?(nhirata.bugzilla)
Product: Taskcluster → Taskcluster Graveyard
You need to log in before you can comment on or make changes to this bug.