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

make test example in /integration_test not running correctly #564

Closed
1 of 5 tasks
robertdefilippi opened this issue Apr 30, 2022 · 4 comments · Fixed by #591
Closed
1 of 5 tasks

make test example in /integration_test not running correctly #564

robertdefilippi opened this issue Apr 30, 2022 · 4 comments · Fixed by #591
Labels
bug Something isn't working

Comments

@robertdefilippi
Copy link

Describe the bug

When in the /integration_test folder, there are Makefile instructions to run a command to show how a basic test would run. I chose postgres target because it does not require any additional configurations, and the command was already specified in the instructions.

$ make test target=postgres models=sql.test_star seeds=sql.data_star

However, within the docker image dbt is not being installed. Which gives an error - dbt: command not found - when it is trying to be called in ./run_test.sh

# in dbt-utils/integration_tests

$ make test target=postgres models=sql.test_star seeds=sql.data_star

docker-compose -f ../docker-compose.yml up dbt
[+] Running 29/29
 ⠿ postgres Pulled                                                               35.8s
   ⠿ b1f00a6a160c Pull complete                                                  16.7s
   ⠿ 25a88a2feda9 Pull complete                                                  17.0s
   ⠿ bcd866a92fb7 Pull complete                                                  17.4s
   ⠿ 8c43cb896f3e Pull complete                                                  34.0s
   ⠿ 341573b3bddd Pull complete                                                  34.1s
   ⠿ d7ccfa970786 Pull complete                                                  34.3s
   ⠿ 32d28928466b Pull complete                                                  34.5s
   ⠿ 8b424957445a Pull complete                                                  34.6s
   ⠿ 88c1161620fb Pull complete                                                  34.8s
   ⠿ ef794b76ff85 Pull complete                                                  34.9s
 ⠿ dbt Pulled                                                                    70.6s
   ⠿ 723254a2c089 Pull complete                                                  13.9s
   ⠿ abe15a44e12f Pull complete                                                  15.7s
   ⠿ 409a28e3cc3d Pull complete                                                  16.6s
   ⠿ 503166935590 Pull complete                                                  34.0s
   ⠿ 0f46f97746e4 Pull complete                                                  59.0s
   ⠿ fe27feb3d509 Pull complete                                                  59.3s
   ⠿ f58221128c68 Pull complete                                                  60.8s
   ⠿ cbbd266a0ce4 Pull complete                                                  60.9s
   ⠿ 011f9871f258 Pull complete                                                  61.2s
   ⠿ 4e3997726b8b Pull complete                                                  61.4s
   ⠿ 977988010023 Pull complete                                                  64.7s
   ⠿ 066725fda23f Pull complete                                                  64.8s
   ⠿ 59f72f290e38 Pull complete                                                  64.9s
   ⠿ bc50f7f7d4cb Pull complete                                                  69.0s
   ⠿ 6d1ecf481a1d Pull complete                                                  69.3s
   ⠿ 8aaac594f19a Pull complete                                                  69.5s
   ⠿ f02eea893f45 Pull complete                                                  69.6s
[+] Running 3/3
 ⠿ Network dbt-utils_default       Created                                        0.1s
 ⠿ Container dbt-utils-postgres-1  Created                                       12.2s
 ⠿ Container dbt-utils-dbt-1       Created                                        0.1s
Attaching to dbt-utils-dbt-1
dbt-utils-dbt-1  | /repo/run_test.sh: line 25: dbt: command not found
dbt-utils-dbt-1  | /repo/run_test.sh: line 26: dbt: command not found
dbt-utils-dbt-1  | /repo/run_test.sh: line 30: dbt: command not found
dbt-utils-dbt-1  | /repo/run_test.sh: line 31: dbt: command not found
dbt-utils-dbt-1 exited with code 127

Steps to reproduce

Go into the /integrations_test folder, and run $ make test target=postgres models=sql.test_star seeds=sql.data_star

Expected results

A dbt job would start showing a passing test on the model test_star

Actual results

dbt-utils-dbt-1  | /repo/run_test.sh: line 25: dbt: command not found
dbt-utils-dbt-1  | /repo/run_test.sh: line 26: dbt: command not found
dbt-utils-dbt-1  | /repo/run_test.sh: line 30: dbt: command not found
dbt-utils-dbt-1  | /repo/run_test.sh: line 31: dbt: command not found
dbt-utils-dbt-1 exited with code 127

System information

# integrations_test/packages.yml
packages:
    - local: ../

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

Additional context

I have a feeling I'm not specifying something correctly in the make command, however with dbt not installing correctly I'm unsure how to debug this.

Thanks!

@dbeatty10
Copy link
Contributor

@robertdefilippi thank you for opening this issue!

I tried re-factoring the Makefile and the instructions to try to address the issues you raised.

You can try it out with the following steps:

  1. Check out the fix/344-564-make-test branch
  2. Follow the instructions within integration_tests/README.md

I'm trying to balance the number of steps to execute as a user versus how much gets re-run every time within the make steps. Might not have the best balance yet.

Any suggestions are welcome.

@dbeatty10 dbeatty10 removed the triage label May 17, 2022
@robertdefilippi
Copy link
Author

Thanks @dbeatty10 I'll take a look 😃

@dbeatty10
Copy link
Contributor

I should have mentioned earlier -- #591 is the PR, and that will be the best place to consolidate any feedback you have.

@robertdefilippi
Copy link
Author

Great! Thanks for that information.

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