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

Fix: Raise a DbtMeshifyError if a project path is provided that does not contain a dbt_project.yml file #163

Merged

Conversation

nicholasyager
Copy link
Collaborator

@nicholasyager nicholasyager commented Sep 5, 2023

Description and Motivation

Previously, it was possible for a user to provide a project path that is not real. For instance, running the command in the wrong directory! In this PR, I've added a check to include that a dbt_project.yml file is present in the project path, and if not, a DbtMeshifyException is raised with a corresponding error message. Along the way, I added tests for each command to confirm that the correct error message is returned if an invalid project path is provided.

Resolves: #87

Example

(dbt-meshify-py3.11) > $ dbt-meshify connect --project-paths test-projects/temp_proj/src_proj_a  test-projects/temp_proj/src_proj_b
19:50:17 | ERROR | The provided directory (/Users/nicholas/projects/nicholasyager/dbt-meshify/test-projects/temp_proj/src_proj_a) does not contain a dbt project.

@nicholasyager nicholasyager added the bug Something isn't working label Sep 5, 2023
@nicholasyager nicholasyager self-assigned this Sep 5, 2023
Copy link
Collaborator

@dave-connors-3 dave-connors-3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦞

@dave-connors-3 dave-connors-3 merged commit d1faa61 into dbt-labs:main Sep 6, 2023
1 check passed
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 this pull request may close these issues.

Running the command when no dbt_project.yml is available crashes
2 participants