-
Notifications
You must be signed in to change notification settings - Fork 773
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
Docker compose for travis #2039
Docker compose for travis #2039
Conversation
c38510f
to
16c9bea
Compare
.ci/travis-before-install.sh
Outdated
if [[ -z ${TOXENV} ]]; then | ||
docker pull python:3.6 | ||
docker pull tendermint/tendermint:0.13 | ||
docker pull mongo:3.4.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why pulling images here? I thought this was already covered by the docker-compose
file. If we can pin dependencies only in one place it's better, so we have less things to do if we update the version of any of those images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, sure. I added this when I was troubleshooting to separate more clearly the different steps. Will take care of it.
|
||
@pytest.fixture | ||
def tendermint_ws_url(tendermint_host, tendermint_port): | ||
return f'ws://{tendermint_host}:{tendermint_port}/websocket' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I didn't know about f
strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to @kansi for using them first!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to be careful about using f
strings for now. ReadTheDocs is failing to build the docs in the tendermint
branch and I think it's because it uses an older version of Python 3.x that doesn't understand f
strings. Not sure. But I took a look at the ReadTheDocs error logs for building the tendermint
branch, and it was saying syntax error on a line with an f
string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the build
option of readthedocs (http://docs.readthedocs.io/en/latest/yaml-config.html#build-image) to use Python 3.6.
msg_data_dict = json.loads(msg.data) | ||
assert msg_data_dict['id'] == stream_id | ||
assert msg_data_dict['jsonrpc'] == '2.0' | ||
# TODO What else should be there? Right now, getting error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems enough for now.
But a more rigrous test would post a transaction to tendermint, once the transaction is commit
ed we should assert that an update was received in the event stream for that transaction.
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0 | ||
BIGCHAINDB_START_TENDERMINT: 0 | ||
TENDERMINT_HOST: tendermint | ||
TENDERMINT_PORT: 46657 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind to use BIGCHAINDB_TENDERMINT_HOST
and BIGCHAINDB_TENDERMINT_PORT
? In this way the env_config
function can pick it up easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sure. But we should address this in a different PR as some code in multiple places will need to be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, we can have it right after this one.
16c9bea
to
211ad79
Compare
Solution: Add Tendermint to stack for CI. For simplicity's sake docker-compose is being used.
aa027fd
to
0965e2f
Compare
Solution: add `BIGCHAINDB_` to new tendermint vars. Reference: bigchaindb#2039 (comment)
Solution: add `BIGCHAINDB_` to new tendermint vars. Reference: #2039 (comment)
Resolves #2038