Skip to content

linting and setup fixes - #1

Merged
maapxa merged 2 commits into
EDITD:python3.7-compatibilityfrom
tmwoodruff:travis
Aug 12, 2021
Merged

linting and setup fixes#1
maapxa merged 2 commits into
EDITD:python3.7-compatibilityfrom
tmwoodruff:travis

Conversation

@tmwoodruff

@tmwoodruff tmwoodruff commented Aug 11, 2021

Copy link
Copy Markdown

This fixes issues I ran into running tests (via make all) using Python 3.8.5.

After these changes (+ some riak config, see below), all but three integration tests that run by default are succeeding. The failing tests are

  • riak.tests.test_mapreduce and riak.tests.test_yokozuna: Error is Unknown message code: 56. Looks like this may be because yokozuna uses Solr, which I haven't configured.
  • test_store_binary_object_from_file_should_use_default_mimetype (riak.tests.test_kv.KVFileTests): Guessing this may just be a difference in how different versions of Riak set MIME types. The MIME type is being set to text/markdown based on the file extension, but the test is expecting application/octet-stream.

Some notes on how I installed and configured Riak locally (Ubuntu 20.04) (very likely I've missed some steps here because there was a lot of trial and error):

# Install Riak dependencies
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb
sudo apt install libtinfo5

# Install riak
wget http://files.edtd.net/riak_2.2.3-1_amd64.deb
sudo dpkg -i riak_2.2.3-1_amd64.deb

# Config updates:
# storage_backend = leveldb
# leveldb.maximum_memory.percent = 20  # was using too much memory
sudo vi /etc/riak/riak.conf

# Start riak
sudo /etc/init.d/riak start

# Add no_siblings bucket type
sudo riak-admin bucket-type create no_siblings '{"props":{"allow_mult":"false"}}'
sudo riak-admin bucket-type activate no_siblings

# Add no_siblings bucket type
sudo riak-admin bucket-type create write_once '{"props": {"write_once": true}}'
sudo riak-admin bucket-type activate write_once

# Add bucket types for data types
sudo riak-admin bucket-type create maps '{"props":{"datatype":"map"}}'
sudo riak-admin bucket-type create sets '{"props":{"datatype":"set"}}'
sudo riak-admin bucket-type create counters '{"props":{"datatype":"counter"}}'
sudo riak-admin bucket-type create hlls  '{"props":{"datatype":"hll"}}'
sudo riak-admin bucket-type activate maps
sudo riak-admin bucket-type activate sets
sudo riak-admin bucket-type activate counters
sudo riak-admin bucket-type activate hlls

# Install riak-python-client dependencies
pip install setuptools
pip install protobuf
pip install tox
sudo apt-get install protobuf-compiler
sudo apt-get install pandoc

# Run lint & tests
make all

@maapxa
maapxa changed the base branch from fix-for-protobuf-3.11 to python3.7-compatibility August 12, 2021 09:59
@maapxa

maapxa commented Aug 12, 2021

Copy link
Copy Markdown

this is awesome, thank you @tmwoodruff we fixed the access issues and can merge this into our p3.7+ branch 🙌

@maapxa maapxa changed the title Travis linting and setup fixes Aug 12, 2021
@maapxa
maapxa merged commit 9848d59 into EDITD:python3.7-compatibility Aug 12, 2021
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.

2 participants