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

[Bug] dbt init overwrite just appends to profile #4375

Closed
1 task done
leahwicz opened this issue Nov 30, 2021 · 5 comments · Fixed by #4447
Closed
1 task done

[Bug] dbt init overwrite just appends to profile #4375

leahwicz opened this issue Nov 30, 2021 · 5 comments · Fixed by #4447
Assignees
Labels
bug Something isn't working init Issues related to initializing the dbt starter project

Comments

@leahwicz
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If you have a profile setup and then you try to setup a new one, it will ask if you want to overwrite existing entry. It just adds another entry and does not overwrite it.

  1. dbt init a new project and verify the connection in profile.yml
  2. inside the existing project run dbt init again and when it asks you to overwrite the connection choose yes.
    There are now 2 entries in profile.yml for it

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:

What database are you using dbt with?

No response

Additional Context

No response

@leahwicz leahwicz added bug Something isn't working init Issues related to initializing the dbt starter project labels Nov 30, 2021
@jtcohen6
Copy link
Contributor

jtcohen6 commented Dec 1, 2021

@leahwicz This isn't something I've managed to reproduce locally. I imagine the fix for it is super straightforward, though

@leahwicz
Copy link
Contributor Author

leahwicz commented Dec 1, 2021

@jtcohen6 yes I was able to do it again so that's why I filed it. I would rate this low on priorities but I would assume its an easy fix as well

@NiallRees
Copy link
Contributor

@leahwicz I also wasn't able to reproduce the issue where two profile entries were created, but there definitely is a bug where the user isn't asked for permission to overwrite an existing profile entry. The above PR addresses that.

@iknox-fa iknox-fa self-assigned this Jan 27, 2022
@iknox-fa
Copy link
Contributor

@leahwicz I was not able to replicate the original described behavior either.
I reviewed @NiallRees's contribution which is perfectly fine code wise, I was unable to replicate that failure-to-ask bug as well.

I tested this on 1.0.0 and 1.0.1 with the same results. Can you both provide the versions you were working with so I can be sure I'm comparing apples to apples?

@iknox-fa
Copy link
Contributor

@NiallRees Never mind my previous comment, that bug is confirmed as is it's fix (thanks again).
I wasn't testing it correctly, mea culpa (the bug only occurs with custom profile_template.yml, which I missed in the first pass)

@leahwicz Let's close this ticket as addressing the issue Niall found and we can open a new one for the double-entry if you can show me how to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working init Issues related to initializing the dbt starter project
Projects
None yet
4 participants