Move Nexus-Sonatype Android build dependency to a `fetch` task
Categories
(Firefox Build System :: Task Configuration, enhancement)
Tracking
(firefox79 fixed)
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: NarcisB, Assigned: nalexander, Mentored)
Details
Attachments
(2 files)
Log link:
https://treeherder.mozilla.org/logviewer.html#?job_id=305397667&repo=autoland
Log snippet:
[task 2020-06-07T22:55:43.279Z] Removing intermediate container 21489dfb411e
[task 2020-06-07T22:55:43.279Z] Step 15 : RUN curl --fail --silent --location --retry 3 https://download.sonatype.com/nexus/oss/nexus-${NEXUS_VERSION}-bundle.tar.gz -o /tmp/nexus-${NEXUS_VERSION}-bundle.tar.gz
[task 2020-06-07T22:55:43.320Z] ---> Running in fd46383d450f
[task 2020-06-07T22:55:44.338Z] The command [/bin/sh -c curl --fail --silent --location --retry 3 https://download.sonatype.com/nexus/oss/nexus-${NEXUS_VERSION}-bundle.tar.gz -o /tmp/nexus-${NEXUS_VERSION}-bundle.tar.gz] returned a non-zero code: 22
kill 9
- kill 9
[taskcluster 2020-06-07 22:55:44.621Z] === Task Finished ===
[taskcluster 2020-06-07 22:55:44.736Z] Artifact "public/image.tar.zst" not found at "/builds/worker/workspace/artifacts/image.tar.zst"
[taskcluster 2020-06-07 22:55:45.015Z] Unsuccessful task run with exit code: 22 completed in 213.765 seconds
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Apparently the Nexus-Sonatype archive is 400+ -- that's what exit 22 means here. It might be intermittent or for real, and locally I see:
$ curl --head https://download.sonatype.com/nexus/oss/nexus-2.12.0-01-bundle.tar.gz
HTTP/2 302
date: Sun, 07 Jun 2020 23:35:26 GMT
content-type: text/html
content-length: 138
location: https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/oss/nexus-2.12.0-01-bundle.tar.gz
server: nginx
surrogate-control: max-age=1209600
So I conclude that this is intermittent. However, we should be using fetch
tasks for this, so I'll mutate this ticket to that.
Assignee | ||
Comment 2•5 years ago
|
||
It's fairly easy to add a new fetch
task -- see the many examples such as this one. But the docker image tasks don't depend on the fetch
type, so this might actually be hard. Maybe Tom has an opinion on feasibility/best practice here?
Comment 3•5 years ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #1)
$ curl --head https://download.sonatype.com/nexus/oss/nexus-2.12.0-01-bundle.tar.gz
Add -L, the fastly url is 404.
Comment 4•5 years ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #2)
It's fairly easy to add a new
fetch
task -- see the many examples such as this one. But the docker image tasks don't depend on thefetch
type, so this might actually be hard. Maybe Tom has an opinion on feasibility/best practice here?
Technically, it would be possible, as long as none of the docker images involved in fetches are not using fetches themselves.
However, if you turn this into a fetch task, does it still need to be burned into the docker image? Can't it be fetched like others?
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #3)
(In reply to Nick Alexander :nalexander [he/him] from comment #1)
$ curl --head https://download.sonatype.com/nexus/oss/nexus-2.12.0-01-bundle.tar.gz
Add -L, the fastly url is 404.
Gah, I even noted that we do follow redirects in the image.
Assignee | ||
Comment 6•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #4)
(In reply to Nick Alexander :nalexander [he/him] from comment #2)
It's fairly easy to add a new
fetch
task -- see the many examples such as this one. But the docker image tasks don't depend on thefetch
type, so this might actually be hard. Maybe Tom has an opinion on feasibility/best practice here?Technically, it would be possible, as long as none of the docker images involved in fetches are not using fetches themselves.
However, if you turn this into a fetch task, does it still need to be burned into the docker image? Can't it be fetched like others?
Yes, I reckon that it can be, since the dependencies task already starts the Nexus-Sonatype daemon itself. Looks like that's the sensible approach here; I can take a first pass today.
Assignee | ||
Updated•5 years ago
|
Comment 7•5 years ago
|
||
The fastly url works, now.
Assignee | ||
Comment 8•5 years ago
|
||
This brings the android-build
image very close to other build
images, paving the way for it to be folded in completely. It also
makes us more resilient in the face of upstream service interruptions.
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Depends on D78945
Comment 10•5 years ago
|
||
This is probably something that we should mirror in the mobile projects.
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a8bed4b38629
https://hg.mozilla.org/mozilla-central/rev/496bb6dc2f9f
Comment 13•5 years ago
|
||
bugherder |
Comment 14•5 years ago
|
||
(In reply to Tom Prince [:tomprince] from comment #10)
This is probably something that we should mirror in the mobile projects.
👍
I'll handle it next time we need to make some changes related to gradle and dependencies fetching.
Description
•