-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
making error msg for malformed packages.yml better #2078
Changes from 1 commit
9eaf243
7fae368
5823683
fa40c41
d354aa6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -60,7 +60,14 @@ | |||||
""" | ||||||
|
||||||
MALFORMED_PACKAGE_ERROR = """\ | ||||||
packages.yml is malformed, please make sure that it matches | ||||||
The packages.yml file in this project is malformed. Please double check the contents | ||||||
of this file and fix any errors before retrying. | ||||||
|
||||||
You can find more information on the syntax for this file here: | ||||||
https://docs.getdbt.com/docs/package-management | ||||||
|
||||||
Validator Error: | ||||||
{error} | ||||||
https://docs.getdbt.com/docs/package-management#section-how-do-i-add-a-package-to-my-project | ||||||
""" | ||||||
|
||||||
|
@@ -135,7 +142,7 @@ def package_config_from_data(packages_data): | |||||
packages = PackageConfig.from_dict(packages_data) | ||||||
except ValidationError as e: | ||||||
raise DbtProjectError( | ||||||
MALFORMED_PACKAGE_ERROR | ||||||
MALFORMED_PACKAGE_ERROR.format(error=str(e)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ooops - I think I led you astray here - we're actually going to want
Suggested change
In practice, this should result in output like: Which i think is pretty good all things considered! Note: we'll also want to remove the duplicated link on line 71! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review! |
||||||
) from e | ||||||
return packages | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that our style guide checker (flake8) failed with this error:
Can you just split this onto two lines to appease flake8? Thanks!