I'm trying to get elementary setup for local devel...
# community-support
e
I'm trying to get elementary setup for local development so I can add support to enable dbt to test elementary compatibility as discussed in Standardizing integration tests for popular dbt packages #10668. I'm having trouble getting all the tests to pass on the master branch after following the Contributing doc instructions. Details in thread.
After installing dependencies I get the following results from the command
py.test -vvv --target postgres
Copy code
==================================================================== short test summary info ====================================================================
FAILED e2e/report/test_report.py::test_report_keys - FileNotFoundError: [Errno 2] No such file or directory: 'edr_target/elementary_output.json'
FAILED e2e/report/test_report.py::test_group - FileNotFoundError: [Errno 2] No such file or directory: 'edr_target/elementary_output.json'
FAILED e2e/report/test_report.py::test_group_views - FileNotFoundError: [Errno 2] No such file or directory: 'edr_target/elementary_output.json'
FAILED e2e/report/test_report.py::test_duplicate_test_runs - FileNotFoundError: [Errno 2] No such file or directory: 'edr_target/elementary_output.json'
FAILED e2e/report/test_report.py::test_test_runs_are_sorted - FileNotFoundError: [Errno 2] No such file or directory: 'edr_target/elementary_output.json'
FAILED e2e/report/test_report.py::test_report_tests - FileNotFoundError: [Errno 2] No such file or directory: 'edr_target/elementary_output.json'
FAILED tests_with_db/test_dbt_runner.py::TestSubprocessDbtRunner::test_run_operation - IndexError: list index out of range
FAILED tests_with_db/test_dbt_runner.py::TestSubprocessDbtRunner::test_ls - assert 'elementary_tests.one' in ['\x1b[0m13:02:02  Encountered an error:', 'Runtime Error', "  Could not find profile named 'elementary_tests'"]
FAILED tests_with_db/test_dbt_runner.py::TestSubprocessDbtRunner::test_seed - assert False is True
FAILED tests_with_db/test_dbt_runner.py::TestSubprocessDbtRunner::test_run - assert False is True
FAILED tests_with_db/test_dbt_runner.py::TestSubprocessDbtRunner::test_test - assert False is True
FAILED tests_with_db/test_dbt_runner.py::TestAPIDbtRunner::test_run_operation - IndexError: list index out of range
FAILED tests_with_db/test_dbt_runner.py::TestAPIDbtRunner::test_ls - assert False
 +  where False = isinstance(None, list)
FAILED tests_with_db/test_dbt_runner.py::TestAPIDbtRunner::test_seed - assert False is True
FAILED tests_with_db/test_dbt_runner.py::TestAPIDbtRunner::test_run - assert False is True
FAILED tests_with_db/test_dbt_runner.py::TestAPIDbtRunner::test_test - assert False is True
========================================================== 16 failed, 111 passed in 108.76s (0:01:48) ===========================================================
I have a postgres target set up for
elementary_tests
but the
test_dbt_runner
failures end up raising this and I'm not sure how to proceed.
Copy code
13:41:57  Encountered an error:
Compilation Error
  dbt found 2 package(s) specified in packages.yml, but only 0 package(s) installed in dbt_packages. Run "dbt deps" to install package dependencies.
or
Copy code
{
  "data": {
    "exc": "Runtime Error\n  No dbt_project.yml found at expected path /private/var/folders/qs/elementary/monitor/dbt_project/dbt_project.yml\n  Verify that each entry within packages.yml (and their transitive dependencies) contains a file named dbt_project.yml\n  "
  },
  "info": {
    "category": "",
    "code": "Z002",
    "extra": {},
    "invocation_id": "d21524a9-dc01-4d39-97be-804b58567f42",
    "level": "error",
    "msg": "Encountered an error:\nRuntime Error\n  No dbt_project.yml found at expected path /private/var/folders/qs/elementary/monitor/dbt_project/dbt_project.yml\n  Verify that each entry within packages.yml (and their transitive dependencies) contains a file named dbt_project.yml\n  ",
    "name": "MainEncounteredError",
    "pid": 39468,
    "thread": "MainThread",
    "ts": "2024-10-11T13:41:57.061663Z"
  }
}
I'm also unsure where the missing files for the e2e tests should be coming from.
I already have a draft PR up but am having trouble getting the same tests to pass so I took a step back to see if I could get them working on master, without any modifications. In my draft I'm skipping the e2e tests for now but would prefer not to if I can avoid it.