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

Updates base and Python dependencies #601

Merged
merged 10 commits into from
Feb 10, 2021
Merged

Conversation

hardbyte
Copy link
Collaborator

@hardbyte hardbyte commented Feb 9, 2021

Kept pulling on a bit of string here... would be a lot easier to just move off alpine.

I've updated all the pinned dependencies in the base dockerfile, including adding the rust compiler so we can build the cryptography package.

Then it looks like the current data61 libraries are incompatible with each other:

Collecting blocklib>=0.1.4
  Downloading blocklib-0.1.7-py3-none-any.whl (22 kB)
INFO: pip is looking at multiple versions of anonlink to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 2) and minio==5.0.10 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested minio==5.0.10
    anonlink-client 0.1.4 depends on minio>=6.0.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

So I've updated all the Python dependencies (dependabot is going to be stoked) and told the ResolutionImpossible where to go.

Then anonlink wouldn't build on alpine...

So I updated anonlink to fix this
  anonlink/solving/_multiparty_solving.cpp:3094:26: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'Py_ssize_t' {aka 'long int'} [-Wsign-compare]
   3094 |   __pyx_t_8 = (__pyx_v_n == __pyx_t_7);
        |                ~~~~~~~~~~^~~~~~~~~~~~
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -DNDEBUG -I./anonlink/solving -Ianonlink/solving -I/usr/include/python3.8 -c anonlink/solving/_multiparty_solving_inner.cpp -o build/temp.linux-x86_64-3.8/anonlink/solving/_multiparty_solving_inner.o -O3 -std=c++11
  anonlink/solving/_multiparty_solving_inner.cpp:10:15: error: 'uint64_t' was not declared in this scope
     10 |     std::hash hasher;
        |               ^~~~~~~~
  anonlink/solving/_multiparty_solving_inner.cpp:10:23: error: template argument 1 is invalid
     10 |     std::hash hasher;
        |                       ^
  anonlink/solving/_multiparty_solving_inner.cpp: In member function 'size_t {anonymous}::RecordHasher::operator()(const Record&) const':
  anonlink/solving/_multiparty_solving_inner.cpp:12:35: error: 'uint64_t' does not name a type
     12 |         return hasher(static_cast(record.dset_i) << 32
        |                                   ^~~~~~~~
  anonlink/solving/_multiparty_solving_inner.cpp:13:37: error: 'uint64_t' does not name a type
     13 |                       ^ static_cast(record.rec_i));
        |                                     ^~~~~~~~
  anonlink/solving/_multiparty_solving_inner.cpp:13:60: error: expression cannot be used as a function
     13 |                       ^ static_cast(record.rec_i));
        |                                                            ^
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for anonlink

Until there is a new release of anonlink I've just pinned the commit hash that fixes the compilation error in the base/requirement.txt file.

I couldn't help myself, I had to update from minio v5 to v7 too... which obviously involved a bugfix in minio-py

@hardbyte hardbyte force-pushed the attempts-to-update-python-deps branch from 88eb380 to 88221ed Compare February 9, 2021 10:01
@hardbyte hardbyte force-pushed the attempts-to-update-python-deps branch from 88221ed to 3509210 Compare February 9, 2021 11:11
@hardbyte hardbyte requested a review from wilko77 February 9, 2021 11:21
@hardbyte hardbyte marked this pull request as ready for review February 9, 2021 11:21
We have pickled BitArray objects for testing (see function `the_truth`), and the class internals have changed.
@hardbyte
Copy link
Collaborator Author

hardbyte commented Feb 9, 2021

@wilko77 I ran out of steam when I hit pickled bitarray objects used in test data, I've rolled back the bitarray dependency. Everything I've updated seems to be working.

The current CI failure appears to be entirely unrelated, while cleaning up after testing kubectl/helm is trying to delete a resource that is already gone:

Error from server (NotFound): error when deleting "/home/vsts/work/_temp/baked-template-20313a84-527c-46ec-b3fb-c14a34c8715c.yaml": pods "azk45569a2-memstore-configmap-test" not found

@@ -4,7 +4,7 @@ EXPOSE 8000
ADD requirements.txt /app/requirements.txt
WORKDIR /app

RUN pip3 install --upgrade pip setuptools && \
RUN python3 -m pip install -U pip && pip3 install --upgrade setuptools && \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without this line the cryptography package is built instead of installed as a wheel!

Copy link
Collaborator

@wilko77 wilko77 left a comment

Choose a reason for hiding this comment

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

Wow. "Just" some dependency updates.
It is a bit worrying that we rely on such an unstable API in minio...
Maybe wait for the new anonlink release and reference that instead.

base/requirements.txt Outdated Show resolved Hide resolved
@hardbyte hardbyte merged commit bdb497c into develop Feb 10, 2021
@hardbyte hardbyte deleted the attempts-to-update-python-deps branch February 10, 2021 03:47
@hardbyte hardbyte added this to the Entity Service v1.14 milestone Feb 23, 2021
wilko77 added a commit that referenced this pull request Feb 24, 2021
* catching NoSuchBucket exception at cleanup (#576)

* fix NoSuchBucket error (#577)

* use the same helper function as the other tests

* more logging on server side

* we need read access to check if bucket exists

* creating bucket if it does not exist

* Bump marshmallow from 3.6.0 to 3.6.1 in /base

Bumps [marshmallow](https://github.com/marshmallow-code/marshmallow) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/marshmallow-code/marshmallow/releases)
- [Changelog](https://github.com/marshmallow-code/marshmallow/blob/dev/CHANGELOG.rst)
- [Commits](marshmallow-code/marshmallow@3.6.0...3.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump pytest from 5.3.5 to 5.4.3 in /base

Bumps [pytest](https://github.com/pytest-dev/pytest) from 5.3.5 to 5.4.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@5.3.5...5.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump anonlink-client from 0.1.2 to 0.1.3 in /base

Bumps [anonlink-client](https://github.com/data61/anonlink-client) from 0.1.2 to 0.1.3.
- [Release notes](https://github.com/data61/anonlink-client/releases)
- [Changelog](https://github.com/data61/anonlink-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/data61/anonlink-client/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* update python3 version (#582)

* update python3 version

* update anonlink-client, as old version was broken

* that overwrites the version from base for no good reason.

* Bump ijson from 3.0.4 to 3.1.1 in /base

Bumps [ijson](https://github.com/ICRAR/ijson) from 3.0.4 to 3.1.1.
- [Release notes](https://github.com/ICRAR/ijson/releases)
- [Changelog](https://github.com/ICRAR/ijson/blob/master/CHANGELOG.md)
- [Commits](ICRAR/ijson@v3.0.4...v3.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump celery from 4.4.2 to 4.4.7 in /base

Bumps [celery](https://github.com/celery/celery) from 4.4.2 to 4.4.7.
- [Release notes](https://github.com/celery/celery/releases)
- [Changelog](https://github.com/celery/celery/blob/master/Changelog.rst)
- [Commits](celery/celery@4.4.2...v4.4.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix case sensitivity in minio metadata

Field names in HTTP headers are case-insensitive, some networks decide that means that can normalize them however they like.

Minio's stat.metadata is a dict of custom HTTP headers. This
small change ensures that queries will get the header regardless
of the case.

* Migrate off deprecated K8s dependencies (#596)

* Update helm minio chart by several major versions
* Migrate off deprecated redis-ha repository
* Provide a fallback UPLOAD_OBJECT_STORE_SERVER option as an ingress isn't required for minio to work.
* Documents upload object store configuration.
* Update azure pipelines
* Update base image deps
* Pin an older version of bitarray
* Update minio image used with docker compose
* Bump the chart version

* Update ingress to include path
Remove defaults from values file for ingress settings
Fixed two typos in the templates.

* Documents ingress configuration

* Updates base and Python dependencies (#601)

* Updates base alpine image
* Updates python requirements
* Use latest release of anonlink and minio
* Fix docker build script and benchmark image
* Adjusts to a new minio. Noticed that minio has a bug if the assume role duration is less than an hour.

* Expose similarities via object store (#594)

Sparse similarity results can be extremely large, this commit adds an option for callers to request the object store path of the similarity results instead of the results themselves.

* Adds a small test ensuring we can pull similarity scores via object store
* Build script now builds the test docker image
* Put common environment variables into a .env file for docker-compose
* Store credentials with environment variable names to avoid confusion and reduce duplication
* The init object store script now creates a readonly user
* Updates documentation on uploading and downloading via object store

* [minor] Update entity-service chart to use helm api v2 (#606)

* Initialize database via alembic

* Delete the raw SQL to create the database

* Update k8s deployment to use alembic

* Update queries to use run_id instead of run for run_results table

* Minio python API now requires a "DeleteObject"

I don't know why.

* Base wasn't building

* Bump psycopg2 from 2.8.4 to 2.8.6 in /base (#604)

Bumps [psycopg2](https://github.com/psycopg/psycopg2) from 2.8.4 to 2.8.6.
- [Release notes](https://github.com/psycopg/psycopg2/releases)
- [Changelog](https://github.com/psycopg/psycopg2/blob/master/NEWS)
- [Commits](https://github.com/psycopg/psycopg2/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: wilko77 <wilko77@users.noreply.github.com>

* Bump alpine from 3.13.1 to 3.13.2 in /base

Bumps alpine from 3.13.1 to 3.13.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Run migration jobs after upgrade as well as after install (#611)

* Connect to object store using TLS if configured to (#614)

* Update env var names in k8s init jobs (#612)

* Update env var name
* Update comment in deployment values
* Update environment variable used in alembic

* Bump iso8601 from 0.1.12 to 0.1.14 in /base

Bumps [iso8601](https://github.com/micktwomey/pyiso8601) from 0.1.12 to 0.1.14.
- [Release notes](https://github.com/micktwomey/pyiso8601/releases)
- [Commits](micktwomey/pyiso8601@0.1.12...0.1.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* bump python3 dependency

Alpine 3.13.2 now needs python3=3.8.7-r1

* Adds recommended k8s labels to  deployments and services (#616)

* Limit the maximum number of candidate pairs (#605)

* Cache the number of identified candidates along with the number of comparisons carried out.
* Update cache test
* Add global limits on number of edges
* Handle the case where there are no cached edges

* Add a step in the integration test pipeline validating if a test result file exists, otherwise fails. (#618)

* Add optional pod annotations to init jobs (#619)

* Adds changelog/release notes for v1.14.0 (#620)

* Proposed changelog for v1.14.0
* Update azure-pipelines.yml to fix a name change in a previous PR...

Co-authored-by: wilko77 <wilko77@users.noreply.github.com>

* Bump pytest-xdist from 1.29.0 to 2.2.1 in /base

Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 1.29.0 to 2.2.1.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-xdist@v1.29.0...v2.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* bump version number

* more bumping...

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Brian Thorne <brian@hardbyte.nz>
Co-authored-by: Brian Thorne <brian@thorne.link>
Co-authored-by: Guillaume Smith <gusmith@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants