I am trying to get set up to contribute to Meltano...
# contributing
m
I am trying to get set up to contribute to Meltano and am getting a bunch of test failures on a freshly cloned+set up repository. Any obvious things I should be looking into? (logs in thread)
test-logs.txt
I am on a mac, using Python 3.9.11, and followed https://docs.meltano.com/contribute/prerequisites#setting-up-your-environment to set up
it looks like I get the same test failures whether I am running the tests with
poetry shell
followed by
pytest
or just
poetry run pytest
w
Do you have Docker and
docker-compose
installed?
It seems like the contributing docs have fallen out of date. Sorry about that. I'll see if I can fix that once we've got your setup fixed.
m
yes to both, docker 20.10.0 and docker-compose 1.27.4
w
What happens if you run the following?
Copy code
cd tests/fixtures/docker
docker-compose up --force-recreate snowplow
m
Copy code
$ docker-compose up --force-recreate
Creating network "docker_default" with the default driver
Creating docker_snowplow_1 ... done
Attaching to docker_snowplow_1
snowplow_1  |
snowplow_1  | No java installations was detected.
snowplow_1  | Please go to <http://www.java.com/getjava/> and download
snowplow_1  |
docker_snowplow_1 exited with code 1
I do have several java JDKs installed, should I be using one in particular?
it’s using JDK14 right now
w
I'm not sure what version of Java is needed. It's whatever is needed by https://github.com/snowplow-incubator/snowplow-micro
When you run
which java
, you get a path to a Java executable, right?
m
yes,
/usr/bin/java
w
You probably don't need to worry about the tests that depend on this Docker container, so I'm going to suggest we forgo figuring out why it isn't working for you, and just focus on getting you up and running. If you edit
tests/fixtures/docker/snowplow.py
such that the first line of the
snowplow_session
function is
return None
, that should fix the problem.
I'll update it properly so that issues like this don't affect others in the future. It's supposed to be optional, but it only checks if you have
docker-compose
, not if the container can actually start.
m
thanks!
w
No problem. Please let me know if that fixed everything, or if there's more I can do to help.
m
I’ve confirmed that if I replace that
snowplow_session
function body with
yield None
, all tests run sucessfully
sorry - apparently I spoke too soon on that facepalm still getting a couple errors for missing module
azure
:
Copy code
ERROR tests/meltano/core/state_store/test_filesystem.py - ModuleNotFoundError: No module named 'azure'
ERROR tests/meltano/core/state_store/test_filesystem.py - ModuleNotFoundError: No module named 'azure'
ERROR tests/meltano/core/state_store/test_filesystem.py - ModuleNotFoundError: No module named 'azure'
ERROR tests/meltano/core/state_store/test_filesystem.py - ModuleNotFoundError: No module named 'azure'
ERROR tests/meltano/core/state_store/test_filesystem.py
ERROR tests/meltano/core/state_store/test_filesystem.py - ModuleNotFoundError: No module named 'azure'
ERROR tests/meltano/core/state_store/test_filesystem.py - ModuleNotFoundError: No module named 'azure'
ERROR tests/meltano/core/state_store/test_filesystem.py - ModuleNotFoundError: No module named 'azure'
ERROR tests/meltano/core/state_store/test_filesystem.py - ModuleNotFoundError: No module named 'azure'
FAILED tests/meltano/core/tracking/test_exception.py::test_complex_exception_context - AssertionError: assert '07d2ff4730eb...7f13790e2a65d' == '8604732e6dd0...79a0b758155d0'
w
You'll want to run
poetry install --all-extras
m
ah, thank you!
Getting just one failure now:
Copy code
FAILED tests/meltano/core/tracking/test_exception.py::test_complex_exception_context - AssertionError: assert '07d2ff4730eb...7f13790e2a65d' == '8604732e6dd0...79a0b758155d0'
w
That will be somewhat more difficult to correct without me being able to interact with the environment in which it is occurring. I'll try to reproduce it. What version of macOS are you using? You're using CPython (the standard Python implementation) version 3.9.11, right? And Meltano + its dependencies installed from
main
?
m
macOS 12.6 Monterey my fork of meltano is one commit behind main https://github.com/menzenski/meltano Python 3.9.11 installed from
pyenv install 3.9.11
w
I have reproduced the error. Looking into it now.
Sorry for the delay. I have opened a PR with the fix: https://github.com/meltano/meltano/pull/7076