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

Download firefox from the firefox-download task #21194

Merged
merged 7 commits into from Jan 27, 2020
Merged

Conversation

jgraham
Copy link
Contributor

@jgraham jgraham commented Jan 15, 2020

This allows using the same revision of Firefox for all tasks in a taskgroup.

@jgraham
Copy link
Contributor Author

jgraham commented Jan 16, 2020

@Hexcles I think you might be the correct reviewer for this, but feel free to punt to someone else if not.

@Hexcles
Copy link
Member

Hexcles commented Jan 16, 2020

Azure Pipelines failed, which seems to be related to shallow clone. Perhaps you could rebase this and try again?

def download_url_to_descriptor(fd, url, max_retries=3):
"""Download an URL in chunks and saves it to a file descriptor (truncating it)
It doesn't close the descriptor, but flushes it on success.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: add a blank line before this line, and remove 1 level of indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An initial blank line doesn't match the style of other code afaict?

tools/wpt/browser.py Show resolved Hide resolved
@@ -82,6 +82,11 @@ components:
browser-firefox:
depends-on:
- download-firefox-${vars.channel}
download-artifacts:
- task: download-firefox-${vars.channel}
artifact: public/results/firefox-${vars.channel}.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest using a different name here. Perhaps artifact-glob, or just glob? There's so many artifact* in download_artifacts that it's a bit confusing.

Alternatively, could we put a concrete filename here instead of a pattern? It'd simplify download_artifacts, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A concrete filename ends up being stronger coupling that causes problems if e.g. the archive format for a download changes. So that's why I went with a glob pattern.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping that we could populate this field in the download task after we download the browser, but it seems like plumbing would be messy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'd rather leave that as a future enhancement.

tools/ci/run_tc.py Outdated Show resolved Hide resolved
@gsnedders gsnedders closed this Jan 24, 2020
@gsnedders gsnedders deleted the fx_task_download branch January 24, 2020 18:06
@gsnedders gsnedders restored the fx_task_download branch January 24, 2020 18:41
@Hexcles Hexcles reopened this Jan 24, 2020
This adds a download-artifacts key to the task definition which allows
specifying a list of artifacts to be downloaded from other tasks, and
a destination. Archives may be automatically unpacked so the
content can be used directly in the rest of the task.
This can be used to remove the version number and so give the download a
consistent name
This ensures that all the runs for a specific revision get the exact same version of Firefox
Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but let's double check Taskcluster to make sure this is actually working.

def download_url_to_descriptor(fd, url, max_retries=3):
"""Download an URL in chunks and saves it to a file descriptor (truncating it)
It doesn't close the descriptor, but flushes it on success.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It doesn't close the descriptor, but flushes it on success.
It doesn't close the descriptor, but flushes it on success.

I meant having a blank line between the one-line summary and the details, like this, which seems to match the coding style in e.g. browser.py. But anyway, this is really just nitpicking/optional :)

@stephenmcgruer stephenmcgruer assigned Hexcles and unassigned jgraham Jan 27, 2020
@jgraham jgraham merged commit 0dce1de into master Jan 27, 2020
@jgraham jgraham deleted the fx_task_download branch January 27, 2020 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants