The creation of the .env files will cause the integration tests to fail due to an improperly defined RELATIVE_UPSTREAM_DB_HOST variable.
Reproduction
just env
just ing-testlocal
Wait for the integration tests to time out & fail, and notice this message in the logs:
integration_ingestion_server_1 | Process Task-1:
integration_ingestion_server_1 | Traceback (most recent call last):
integration_ingestion_server_1 | File "/usr/local/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
integration_ingestion_server_1 | self.run()
integration_ingestion_server_1 | File "/ingestion_server/ingestion_server/tasks.py", line 110, in run
integration_ingestion_server_1 | reload_upstream(self.model)
integration_ingestion_server_1 | File "/ingestion_server/ingestion_server/ingest.py", line 292, in reload_upstream
integration_ingestion_server_1 | downstream_cur.execute(init_fdw)
integration_ingestion_server_1 | psycopg2.errors.SqlclientUnableToEstablishSqlconnection: could not connect to server "upstream"
integration_ingestion_server_1 | DETAIL: could not translate host name "upstream_db" to address: Try again
integration_ingestion_server_1 |
Expectation
The integration tests should succeed even if new .env files are created.
Additional context
I believe this is the root cause of the issue I was trying to address in #364!
Resolution
🙋 I would be interested in resolving this bug.
The text was updated successfully, but these errors were encountered:
The ing-testlocal recipe runs the tests inside a Pipenv subshell using pipenv run. Pipenv automatically loads the .env file (if it finds one) and overwrites the existing env vars. So I think setting the PIPENV_DONT_LOAD_ENV env var shoud fix this behaviour.
I tried the PIPENV_DONT_LOAD_ENV variable and unfortunately it still failed. I think this is a product of docker-compose automatically picking up .env files and using them where available
Description
The creation of the
.envfiles will cause the integration tests to fail due to an improperly definedRELATIVE_UPSTREAM_DB_HOSTvariable.Reproduction
just envjust ing-testlocalExpectation
The integration tests should succeed even if new
.envfiles are created.Additional context
I believe this is the root cause of the issue I was trying to address in #364!
Resolution
The text was updated successfully, but these errors were encountered: