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

Can't find tox config file when running make test-unit #2739

Closed
1 task done
heisencoder opened this issue Sep 2, 2020 · 5 comments · Fixed by #2741
Closed
1 task done

Can't find tox config file when running make test-unit #2739

heisencoder opened this issue Sep 2, 2020 · 5 comments · Fixed by #2741
Labels
bug Something isn't working

Comments

@heisencoder
Copy link
Contributor

Describe the bug

I'm trying to get my local developer setup by following the commands in https://github.com/fishtown-analytics/dbt/blob/dev/marian-anderson/CONTRIBUTING.md, but am running into issues with tox while running the unit tests.

$ make test-unit
Unit test run starting...
Starting dbt_database_1 ... done
ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found
Command exited with non-zero status 1
0.54user 0.11system 0:02.48elapsed 26%CPU (0avgtext+0avgdata 70524maxresident)k
0inputs+0outputs (0major+28516minor)pagefaults 0swaps
make: *** [Makefile:14: test-unit] Error 1

I can see tox.ini in my Git repo clone, so some other layer is expecting tox.ini elsewhere. I can also get it fail when running docker directly:

$ docker-compose run test tox -e integration-postgres-py36 -- -x
Starting dbt_database_1 ... done
ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found

Steps To Reproduce

Expected behavior

This should run the unit tests.

System information

Which database are you using dbt with?

  • postgres

The output of dbt --version:

$ dbt --version
installed version: 0.18.0-rc1
   latest version: 0.17.2

Your version of dbt is ahead of the latest release!

Plugins:
  - postgres: 0.18.0rc1
  - redshift: 0.18.0rc1
  - snowflake: 0.18.0rc1
  - bigquery: 0.18.0rc1

The operating system you're using:
Debian 10 Linux variant

The output of python --version:
Python 3.8.5

Additional context

I've installed docker and docker-compose, along with the other recommended tools. This is reproducible in two of my Linux systems.

@heisencoder heisencoder added bug Something isn't working triage labels Sep 2, 2020
@heisencoder
Copy link
Contributor Author

(See discussion in Slack on this topic at https://app.slack.com/client/T0VLPD22H/C50NEBJGG/thread/C50NEBJGG-1599003795.014400)

@jtcohen6 jtcohen6 removed the triage label Sep 3, 2020
@jtcohen6
Copy link
Contributor

jtcohen6 commented Sep 3, 2020

Thanks for linking that thread. This is so outside my wheelhouse, but I'm supportive of any changes we can make here that, as @beckjake said, will not require env changes for the vast majority of users.

And I'm appreciative of the time and energy you've dedicated to local testing @heisencoder!

@heisencoder
Copy link
Contributor Author

I've tested this fix for Linux, but don't know for sure if it works on Mac or Windows (although I expect it will). The GitHub Actions should test against Windows, but I might need someone with a Mac to manually test the change locally on their system.

@jtcohen6
Copy link
Contributor

jtcohen6 commented Sep 3, 2020

Can do!

jweibel22 pushed a commit to jweibel22/dbt that referenced this issue Sep 18, 2020
See dbt-labs#2739

This change enables Linux users to run the dbt tests via the docker
image. It follows the recommendations from this article:
https://jtreminio.com/blog/running-docker-containers-as-current-host-user/

Notable changes:
*  Added new Makefile rule to generate a .env file that contains USER_ID
and GROUP_ID environment variables to the ID of the current user. This
is in turn used by docker-compose and the Dockerfile to make the Docker
image run as the current user. (Note that on Windows or Mac, this
behavior happens by default).
*  Reordered Dockerfile to allow for better caching of intermediate
images (i.e., put things that don't depend on ARGS earlier).
*  Bumped CircleCI's Dockerfile from version 7 to 9.  Jake rebuilt
9 off of this PR.
@jtcohen6
Copy link
Contributor

jtcohen6 commented Dec 3, 2020

resolved by #2768

@jtcohen6 jtcohen6 closed this as completed Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants