diff options
-rw-r--r-- | buildstream/_artifactcache.py (renamed from buildstream/_artifactcache/artifactcache.py) | 16 | ||||
-rw-r--r-- | buildstream/_cas/__init__.py (renamed from buildstream/_artifactcache/__init__.py) | 2 | ||||
-rw-r--r-- | buildstream/_cas/cascache.py (renamed from buildstream/_artifactcache/cascache.py) | 0 | ||||
-rw-r--r-- | buildstream/_cas/casserver.py (renamed from buildstream/_artifactcache/casserver.py) | 0 | ||||
-rw-r--r-- | buildstream/_context.py | 2 | ||||
-rw-r--r-- | buildstream/sandbox/_sandboxremote.py | 2 | ||||
-rw-r--r-- | doc/source/using_configuring_artifact_server.rst | 2 | ||||
-rw-r--r-- | tests/artifactcache/config.py | 3 | ||||
-rw-r--r-- | tests/artifactcache/expiry.py | 4 | ||||
-rw-r--r-- | tests/sandboxes/storage-tests.py | 2 | ||||
-rw-r--r-- | tests/storage/virtual_directory_import.py | 2 | ||||
-rw-r--r-- | tests/testutils/artifactshare.py | 4 | ||||
-rw-r--r-- | tests/utils/misc.py | 2 |
13 files changed, 20 insertions, 21 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache.py index b4b8df320..1b2b55da2 100644 --- a/buildstream/_artifactcache/artifactcache.py +++ b/buildstream/_artifactcache.py @@ -23,14 +23,14 @@ import signal import string from collections.abc import Mapping -from ..types import _KeyStrength -from .._exceptions import ArtifactError, CASError, LoadError, LoadErrorReason -from .._message import Message, MessageType -from .. import _signals -from .. import utils -from .. import _yaml - -from .cascache import CASRemote, CASRemoteSpec +from .types import _KeyStrength +from ._exceptions import ArtifactError, CASError, LoadError, LoadErrorReason +from ._message import Message, MessageType +from . import _signals +from . import utils +from . import _yaml + +from ._cas import CASRemote, CASRemoteSpec CACHE_SIZE_FILE = "cache_size" diff --git a/buildstream/_artifactcache/__init__.py b/buildstream/_cas/__init__.py index fad483a57..7386109bc 100644 --- a/buildstream/_artifactcache/__init__.py +++ b/buildstream/_cas/__init__.py @@ -17,4 +17,4 @@ # Authors: # Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> -from .artifactcache import ArtifactCache, ArtifactCacheSpec, CACHE_SIZE_FILE +from .cascache import CASCache, CASRemote, CASRemoteSpec diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_cas/cascache.py index 482d4006f..482d4006f 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_cas/cascache.py diff --git a/buildstream/_artifactcache/casserver.py b/buildstream/_cas/casserver.py index 2dd30a367..2dd30a367 100644 --- a/buildstream/_artifactcache/casserver.py +++ b/buildstream/_cas/casserver.py diff --git a/buildstream/_context.py b/buildstream/_context.py index 90690043c..8b9f47bd6 100644 --- a/buildstream/_context.py +++ b/buildstream/_context.py @@ -31,7 +31,7 @@ from ._exceptions import LoadError, LoadErrorReason, BstError from ._message import Message, MessageType from ._profile import Topics, profile_start, profile_end from ._artifactcache import ArtifactCache -from ._artifactcache.cascache import CASCache +from ._cas import CASCache from ._workspaces import Workspaces, WorkspaceProjectCache, WORKSPACE_PROJECT_FILE from .plugin import _plugin_lookup from .sandbox import SandboxRemote diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py index a842f08d3..8b4c87cf5 100644 --- a/buildstream/sandbox/_sandboxremote.py +++ b/buildstream/sandbox/_sandboxremote.py @@ -38,7 +38,7 @@ from .._protos.google.rpc import code_pb2 from .._exceptions import SandboxError from .. import _yaml from .._protos.google.longrunning import operations_pb2, operations_pb2_grpc -from .._artifactcache.cascache import CASRemote, CASRemoteSpec +from .._cas import CASRemote, CASRemoteSpec class RemoteExecutionSpec(namedtuple('RemoteExecutionSpec', 'exec_service storage_service action_service')): diff --git a/doc/source/using_configuring_artifact_server.rst b/doc/source/using_configuring_artifact_server.rst index cc4880e94..bcf7d0e16 100644 --- a/doc/source/using_configuring_artifact_server.rst +++ b/doc/source/using_configuring_artifact_server.rst @@ -94,7 +94,7 @@ requiring BuildStream's more exigent dependencies by setting the Command reference ~~~~~~~~~~~~~~~~~ -.. click:: buildstream._artifactcache.casserver:server_main +.. click:: buildstream._cas.casserver:server_main :prog: bst-artifact-server diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py index df40d1073..8c8c4b48c 100644 --- a/tests/artifactcache/config.py +++ b/tests/artifactcache/config.py @@ -3,8 +3,7 @@ import pytest import itertools import os -from buildstream._artifactcache import ArtifactCacheSpec -from buildstream._artifactcache.artifactcache import _configured_remote_artifact_cache_specs +from buildstream._artifactcache import ArtifactCacheSpec, _configured_remote_artifact_cache_specs from buildstream._context import Context from buildstream._project import Project from buildstream.utils import _deduplicate diff --git a/tests/artifactcache/expiry.py b/tests/artifactcache/expiry.py index 05cbe3209..e73928363 100644 --- a/tests/artifactcache/expiry.py +++ b/tests/artifactcache/expiry.py @@ -342,13 +342,13 @@ def test_invalid_cache_quota(cli, datafiles, tmpdir, quota, success): total_space = 10000 volume_space_patch = mock.patch( - "buildstream._artifactcache.artifactcache.ArtifactCache._get_volume_space_info_for", + "buildstream._artifactcache.ArtifactCache._get_volume_space_info_for", autospec=True, return_value=(free_space, total_space), ) cache_size_patch = mock.patch( - "buildstream._artifactcache.artifactcache.ArtifactCache.get_cache_size", + "buildstream._artifactcache.ArtifactCache.get_cache_size", autospec=True, return_value=0, ) diff --git a/tests/sandboxes/storage-tests.py b/tests/sandboxes/storage-tests.py index e646a620a..38716776a 100644 --- a/tests/sandboxes/storage-tests.py +++ b/tests/sandboxes/storage-tests.py @@ -3,7 +3,7 @@ import pytest from buildstream._exceptions import ErrorDomain -from buildstream._artifactcache.cascache import CASCache +from buildstream._cas import CASCache from buildstream.storage._casbaseddirectory import CasBasedDirectory from buildstream.storage._filebaseddirectory import FileBasedDirectory diff --git a/tests/storage/virtual_directory_import.py b/tests/storage/virtual_directory_import.py index fa40b1723..0bb47e3cd 100644 --- a/tests/storage/virtual_directory_import.py +++ b/tests/storage/virtual_directory_import.py @@ -8,7 +8,7 @@ from tests.testutils import cli from buildstream.storage._casbaseddirectory import CasBasedDirectory from buildstream.storage._filebaseddirectory import FileBasedDirectory from buildstream._artifactcache import ArtifactCache -from buildstream._artifactcache.cascache import CASCache +from buildstream._cas import CASCache from buildstream import utils diff --git a/tests/testutils/artifactshare.py b/tests/testutils/artifactshare.py index 38c54a947..6b03d8d36 100644 --- a/tests/testutils/artifactshare.py +++ b/tests/testutils/artifactshare.py @@ -11,8 +11,8 @@ from multiprocessing import Process, Queue import pytest_cov from buildstream import _yaml -from buildstream._artifactcache.cascache import CASCache -from buildstream._artifactcache.casserver import create_server +from buildstream._cas import CASCache +from buildstream._cas.casserver import create_server from buildstream._exceptions import CASError from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 diff --git a/tests/utils/misc.py b/tests/utils/misc.py index 4ab29ad38..a34d3cda5 100644 --- a/tests/utils/misc.py +++ b/tests/utils/misc.py @@ -23,7 +23,7 @@ def test_parse_size_over_1024T(cli, tmpdir): _yaml.dump({'name': 'main'}, str(project.join("project.conf"))) volume_space_patch = mock.patch( - "buildstream._artifactcache.artifactcache.ArtifactCache._get_volume_space_info_for", + "buildstream._artifactcache.ArtifactCache._get_volume_space_info_for", autospec=True, return_value=(1025 * TiB, 1025 * TiB) ) |