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

Loosely Couple CLI #4179

Closed
1 task done
nathaniel-may opened this issue Nov 1, 2021 · 4 comments
Closed
1 task done

Loosely Couple CLI #4179

nathaniel-may opened this issue Nov 1, 2021 · 4 comments
Labels
enhancement New feature or request stale Issues that have gone stale tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality

Comments

@nathaniel-may
Copy link
Contributor

nathaniel-may commented Nov 1, 2021

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

I would like to see the dbt cli loosely coupled from the rest of the core code base. This way the cli could be parsed into an object, and the rest of the code can access that object's fields. Today we have the cli parsing arguments and mutating global state without saving the original values, which makes it difficult to respect the inputs users have given us later in the flow.

Additionally, users have noticed how slow the CLI is to start up (e.g. - #4627), and separating out the CLI would allow us to more easily return quickly without loading unnecessary resources when we invoke dbt with invalid arguments or just ask for the version.

Describe alternatives you've considered

We could just keep adding global mutations of values ad-hoc every time we need them. It's just messy and keeps the cli unnecessary tightly coupled.

Who will this benefit?

dbt core devs and community contributors.

Are you interested in contributing this feature?

Yes

Anything else?

No response

@nathaniel-may nathaniel-may added enhancement New feature or request triage tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality labels Nov 1, 2021
@nathaniel-may nathaniel-may changed the title [Feature] <title> Loosely Couple CLI Nov 1, 2021
@jtcohen6 jtcohen6 removed the triage label Nov 3, 2021
@nathaniel-may
Copy link
Contributor Author

Realistically, this same approach should be applied to the cli, all environment variables, and reading files, probably in that order.

@jtcohen6
Copy link
Contributor

I know we've discussed this previously: As part of splitting out / rewriting the CLI, we should also consider alternatives to argparse. It can do some surprising things today:

@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Aug 17, 2022
@github-actions
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale Issues that have gone stale tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
Development

No branches or pull requests

2 participants