Bug 1460475 - Install zstandard 0.9.0 in mach; r?dustin
The latest python-zstandard uses a newer zstandard that is faster.
It also has wheels available, which means installation doesn't require
Python development headers, etc.
MozReview-Commit-ID: 5gRq81KYmX4
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -385,24 +385,20 @@ class MachCommands(MachCommandBase):
filtered_taskgraph = TaskGraph(filteredtasks, Graph(set(filteredtasks), filterededges))
return filtered_taskgraph
@CommandProvider
class TaskClusterImagesProvider(MachCommandBase):
def _ensure_zstd(self):
try:
- import zstd
- # There are two zstd libraries that exist in the wild, ensure we
- # have the right one.
- zstd.ZstdCompressor
- zstd.ZstdDecompressor
+ import zstandard # noqa: F401
except (ImportError, AttributeError):
self._activate_virtualenv()
- self.virtualenv_manager.install_pip_package('zstandard==0.8.1')
+ self.virtualenv_manager.install_pip_package('zstandard==0.9.0')
@Command('taskcluster-load-image', category="ci",
description="Load a pre-built Docker image")
@CommandArgument('--task-id',
help="Load the image at public/image.tar.zst in this task,"
"rather than searching the index")
@CommandArgument('-t', '--tag',
help="tag that the image should be loaded as. If not "
--- a/taskcluster/taskgraph/docker.py
+++ b/taskcluster/taskgraph/docker.py
@@ -118,17 +118,17 @@ class IteratorReader(object):
def load_image(url, imageName=None, imageTag=None):
"""
Load docker image from URL as imageName:tag, if no imageName or tag is given
it will use whatever is inside the zstd compressed tarball.
Returns an object with properties 'image', 'tag' and 'layer'.
"""
- import zstd
+ import zstandard as zstd
# If imageName is given and we don't have an imageTag
# we parse out the imageTag from imageName, or default it to 'latest'
# if no imageName and no imageTag is given, 'repositories' won't be rewritten
if imageName and not imageTag:
if ':' in imageName:
imageName, imageTag = imageName.split(':', 1)
else: