diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-02-06 19:34:09 +0000 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-02-06 19:34:09 +0000 |
commit | 1a75b252ba4b91ab4d3c84cb5081d1039d1c3f0f (patch) | |
tree | 0674a6929ea4593ab25bc4a17d7908ae6433c659 | |
parent | 256bcde5e09848f62b3621c4db0e56440d293889 (diff) | |
parent | 8f90be91d3da71394065cdc0814710efba9b6736 (diff) | |
download | buildstream-1a75b252ba4b91ab4d3c84cb5081d1039d1c3f0f.tar.gz |
Merge branch 'danielsilverstone-ct/other-roaring' into 'master'
loadelement.py: Switch from roaringbitmap to pyroaring
Closes #899
See merge request BuildStream/buildstream!1133
-rw-r--r-- | .gitlab-ci.yml | 26 | ||||
-rw-r--r-- | buildstream/_loader/loadelement.py | 6 | ||||
-rw-r--r-- | requirements/requirements.in | 4 | ||||
-rw-r--r-- | requirements/requirements.txt | 4 |
4 files changed, 18 insertions, 22 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6b7ddcee..1656c4ac5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: buildstream/testsuite-debian:9-5da27168-32c47d1c +image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:9-master-46405991 cache: key: "$CI_JOB_NAME-" @@ -46,23 +46,23 @@ variables: - .coverage-reports tests-debian-9: - image: buildstream/testsuite-debian:9-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:9-master-46405991 <<: *tests tests-fedora-27: - image: buildstream/testsuite-fedora:27-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:27-master-46405991 <<: *tests tests-fedora-28: - image: buildstream/testsuite-fedora:28-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991 <<: *tests tests-ubuntu-18.04: - image: buildstream/testsuite-ubuntu:18.04-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-ubuntu:18.04-master-46405991 <<: *tests tests-python-3.7-stretch: - image: buildstream/testsuite-python:3.7-stretch-a60f0c39 + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-python:3.7-stretch-master-46405991 <<: *tests variables: @@ -73,10 +73,10 @@ tests-python-3.7-stretch: tests-centos-7.6: <<: *tests - image: buildstream/testsuite-centos:7.6-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-centos:7.6.1810-master-46405991 overnight-fedora-28-aarch64: - image: buildstream/testsuite-fedora:aarch64-28-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:aarch64-28-master-46405991 tags: - aarch64 <<: *tests @@ -95,7 +95,7 @@ overnight-fedora-28-aarch64: tests-unix: # Use fedora here, to a) run a test on fedora and b) ensure that we # can get rid of ostree - this is not possible with debian-8 - image: buildstream/testsuite-fedora:27-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:27-master-46405991 <<: *tests variables: BST_FORCE_BACKEND: "unix" @@ -105,7 +105,7 @@ tests-unix: # We remove the Bubblewrap and OSTree packages here so that we catch any # codepaths that try to use them. Removing OSTree causes fuse-libs to # disappear unless we mark it as user-installed. - - dnf mark install fuse-libs + - dnf mark install fuse-libs systemd-udev - dnf erase -y bubblewrap ostree # Since the unix platform is required to run as root, no user change required @@ -113,14 +113,14 @@ tests-unix: tests-fedora-missing-deps: # Ensure that tests behave nicely while missing bwrap and ostree - image: buildstream/testsuite-fedora:28-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991 <<: *tests script: # We remove the Bubblewrap and OSTree packages here so that we catch any # codepaths that try to use them. Removing OSTree causes fuse-libs to # disappear unless we mark it as user-installed. - - dnf mark install fuse-libs + - dnf mark install fuse-libs systemd-udev - dnf erase -y bubblewrap ostree - useradd -Um buildstream @@ -132,7 +132,7 @@ tests-fedora-update-deps: # Check if the tests pass after updating requirements to their latest # allowed version. allow_failure: true - image: buildstream/testsuite-fedora:28-5da27168-32c47d1c + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991 <<: *tests script: diff --git a/buildstream/_loader/loadelement.py b/buildstream/_loader/loadelement.py index 465d97f2c..17154ee64 100644 --- a/buildstream/_loader/loadelement.py +++ b/buildstream/_loader/loadelement.py @@ -21,7 +21,7 @@ from collections.abc import Mapping from itertools import count -from roaringbitmap import RoaringBitmap, ImmutableRoaringBitmap # pylint: disable=no-name-in-module +from pyroaring import BitMap, FrozenBitMap # pylint: disable=no-name-in-module # BuildStream toplevel imports from .._exceptions import LoadError, LoadErrorReason @@ -123,7 +123,7 @@ class LoadElement(): if self._dep_cache: return - self._dep_cache = RoaringBitmap() + self._dep_cache = BitMap() for dep in self.dependencies: elt = dep.element @@ -137,7 +137,7 @@ class LoadElement(): # And we depend on everything this element depends on self._dep_cache.update(elt._dep_cache) - self._dep_cache = ImmutableRoaringBitmap(self._dep_cache) + self._dep_cache = FrozenBitMap(self._dep_cache) # _extract_depends_from_node(): diff --git a/requirements/requirements.in b/requirements/requirements.in index 9e55084dc..45e7b8075 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -13,6 +13,4 @@ psutil # See issues #571 and #790. ruamel.yaml >= 0.15.41, < 0.15.52 setuptools -# (Potentially) short-term need for roaring bitmaps for the -# loader dependency sorting -roaringbitmap +pyroaring diff --git a/requirements/requirements.txt b/requirements/requirements.txt index fa21c48b7..115879ad9 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -13,9 +13,7 @@ psutil==5.4.8 # See issues #571 and #790. ruamel.yaml==0.15.51 setuptools==39.0.1 -# (Potentially) short-term need for roaring bitmaps for the -# loader dependency sorting -roaringbitmap==0.6 +pyroaring==0.2.6 ## The following requirements were added by pip freeze: MarkupSafe==1.1.0 six==1.12.0 |