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
Conversation
965cbc3
to
e2e4235
Compare
@Hexcles I think you might be the correct reviewer for this, but feel free to punt to someone else if not. |
Azure Pipelines failed, which seems to be related to shallow clone. Perhaps you could rebase this and try again? |
tools/ci/run_tc.py
Outdated
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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/ci/tc/tasks/test.yml
Outdated
@@ -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}.* |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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
e2e4235
to
54feb0f
Compare
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :)
This allows using the same revision of Firefox for all tasks in a taskgroup.