-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Regression: a profile should not be required to run dbt deps
#2231
Comments
+1 Today I've bumped my |
I think it's due to |
Hey @Raalsky - #b8febdd is definitely the relevant change. If you able and interested, it would be awesome if you could send through a PR! I just made a new dev branch - |
I'm pretty sure we did this for for the following chain of reasons:
We can revisit any of those for sure, or see about offering some sort of workaround (no profile -> |
@beckjake Thank you. I was looking for such a list. 👍
I'm looking for something like a lazy profile load (I hope so 😉). But I think it could be too complicated for short PR. I think it's ok as hotfix if we fill something like default empty profile and raising only on attribute requests as you suggested? |
We want to prioritize consistency around how dbt compiles projects. This entails having consistent and well-documented compilation contexts for jinja strings, and therefore, consistent inputs into dbt's compilation. In thinking more about this issue, I'm increasingly hesitant to let Here's a quick example: you can use Just practically speaking, my instincts are that the @Raalsky - can you speak a little more about your requirements here? I do think providing a dummy profile should work well, but I want to make sure I understand your needs (and the needs of everyone else who is interested in this issue!) before making a final call |
Just to be clear. The It’s something similar to Android app installer with requesting permission popups. For ex. mail client calling me during installation that it need acccess to my microphone it's something confusing. I could not know that it's VoiceToText capable. But a request it's okay when I actually just pressed a record button. What I would like to see (in future) is loading the profile actually only when I really need it or be more clear with how we treat private data. A really really abstract vision but Python-capable (:stuck_out_tongue_winking_eye: ): def lookup_for_your_profile_data_or_raise():
print('I NEED YOUR DATA NOW!')
return 'My Private Data'
class A(object):
def __init__(self):
self.data = None
self._initialized = False
def _initialize(self):
self.data = lookup_for_your_profile_data_or_raise()
class Profile(A):
def __init__(self):
super().__init__()
def __getattribute__(self, name):
if not super().__getattribute__('_initialized'):
super()._initialize()
return super().__getattribute__(name)
# dbt deps without hacky target.name etc.
without_profile = Profile()
# OUTPUT: <NOTHING>
# dbt deps with hacky target.name etc.
with_profile = Profile()
with_profile.data
# OUTPUT: 'My Private Data' The “empty profile” is just something to be backward compatible and I definitely don’t enforce it 😉! . I’m really excited about the direction to be more consistent in the codebase and during access through Jinja contexts. To be clear once more: It’s fine for me to break this today but looking for solutions that treat privacy data more carefully. May the Force be with you! |
Thanks @Raalsky - I buy it! Let's go ahead and pursue this approach of a "phony" profile. If you try to get any attributes of the profile, dbt should raise. This issue can be closed when Let's ship this for 0.16.1 |
…required Do not require a profile in "dbt deps" (#2231)
closed by #2290 |
Describe the bug
This is a regression in 0.16.0. Previous releases of dbt did not require a valid profile to exist in order to download deps stated in a
packages.yml
file.TBD what the exact use case is here, but this is a regression, and we should either reinstate the previous behavior or recommend an alternative approach.
Steps To Reproduce
Expected behavior
dbt deps does not strictly need a profile to operate, and dbt should be able to invoke the task without a valid profile.
Additional context
I do not think it is unreasonable to require that a valid profile exists (even with bad/incorrect data) to run
dbt deps
. I imagine the use-case has something to do with building a Docker image, or similar. Let's weigh the tradeoffs of fixing this regression with our goals of making compilation and task execution consistent and interrogable when considering what to do with this bug report.The text was updated successfully, but these errors were encountered: