-
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
Better error message for Private package definition #10084
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10084 +/- ##
==========================================
- Coverage 88.21% 88.18% -0.04%
==========================================
Files 181 181
Lines 22748 22759 +11
==========================================
+ Hits 20068 20069 +1
- Misses 2680 2690 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -304,7 +305,7 @@ def test__invalid_color_config_block( | |||
self, | |||
project, | |||
): | |||
with pytest.raises(ValidationError): | |||
with pytest.raises((ValidationError, ConfigUpdateError)): |
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.
This caused an issue in CI because of the execution order of tests. Since Gerda also ran into this before, I am just fixing it here.
349e03a
to
4dc17f2
Compare
core/dbt/deps/resolver.py
Outdated
@@ -74,6 +75,10 @@ def update_from(self, src: List[PackageSpec]) -> None: | |||
pkg = TarballUnpinnedPackage.from_contract(contract) | |||
elif isinstance(contract, GitPackage): | |||
pkg = GitUnpinnedPackage.from_contract(contract) | |||
elif isinstance(contract, PrivatePackage): | |||
raise DbtInternalError( |
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 don't think this should be a DbtInternalError if it can be caused by user-configuration and is resolvable given user action
resolves #10083
Problem
We are introducing better support for private package in dbt-cloud, which allows people to define a new package.
If we don't do anything in core, this would lead to core raising
Instead, we should have a clear message telling people to define git package.
Solution
Checklist