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

[CT-61] [Bug] interactive dbt init allows illegal project names #4490

Closed
1 task done
joellabes opened this issue Dec 15, 2021 · 9 comments · Fixed by #4536
Closed
1 task done

[CT-61] [Bug] interactive dbt init allows illegal project names #4490

joellabes opened this issue Dec 15, 2021 · 9 comments · Fixed by #4536
Labels
bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors! init Issues related to initializing the dbt starter project jira
Milestone

Comments

@joellabes
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I just set up a sandbox project for myself using the new interactive dbt-init. When it asked what I wanted to call it, I chose joel-sandbox.

When I ran dbt debug, it failed because 'joel-sandbox' does not match '^[^\\d\\W]\\w*$'.

Expected Behavior

dbt init should at minimum include the "lowercase and underscores only" rule, and really should also validate that the input conforms.

Steps To Reproduce

No response

Relevant log output

Project loading failed for the following reason:
Runtime Error
  at path ['name']: 'joel-sandbox' does not match '^[^\\d\\W]\\w*$'

Error encountered in /Users/joel/Documents/GitHub/joel-sandbox/dbt_project.yml

Environment

- OS: MacOS
- Python: 3.8.10
- dbt: 1.0.0

What database are you using dbt with?

snowflake

Additional Context

No response

@joellabes joellabes added bug Something isn't working triage labels Dec 15, 2021
@jtcohen6 jtcohen6 added init Issues related to initializing the dbt starter project Team: Execution labels Dec 15, 2021
@iknox-fa iknox-fa added good_first_issue Straightforward + self-contained changes, good for new contributors! and removed triage labels Dec 20, 2021
@iknox-fa
Copy link
Contributor

Thanks for the bug report @joellabes! We'll get this sorted ASAP.

@amirkdv
Copy link
Contributor

amirkdv commented Dec 28, 2021

@joellabes I took a stab at this! PR is ready for review

p.s: first time dbt contributor 🤓

@joellabes
Copy link
Contributor Author

That's awesome @amirkdv! Thanks for the contribution.

I'll leave the Core team to handle the review 😁

@jtcohen6 jtcohen6 added this to the v1.0.2 milestone Jan 13, 2022
@leahwicz leahwicz added the jira label Jan 19, 2022
@github-actions github-actions bot changed the title [Bug] interactive dbt init allows illegal project names [CT-61] [Bug] interactive dbt init allows illegal project names Jan 19, 2022
@leahwicz
Copy link
Contributor

leahwicz commented Feb 1, 2022

@ChenyuLInx let's remember to backport this as well

@bendiktv2
Copy link

The tutorial needs to be updated to use a valid project name: https://docs.getdbt.com/tutorial/create-a-project-dbt-cli

@jtcohen6
Copy link
Contributor

@bendiktv2 Good call! Could I ask you to open a quick issue or PR at https://github.com/dbt-labs/docs.getdbt.com? If you scroll to the bottom of that page, there's also an "Edit this page" link that will open the appropriate file in GitHub's web editor.

@bendiktv2
Copy link

@jtcohen6 , please see #1155 :)

@bendiktv2
Copy link

Sorry, PR is in other repo. Here is the correct link: dbt-labs/docs.getdbt.com#1155

@jtcohen6
Copy link
Contributor

Thank you!! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors! init Issues related to initializing the dbt starter project jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants