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-3395] [Feature] Merge --dry-run and --lock into the same flag for dbt deps #9100

Closed
3 tasks done
dbeatty10 opened this issue Nov 15, 2023 · 1 comment · Fixed by #9169
Closed
3 tasks done

[CT-3395] [Feature] Merge --dry-run and --lock into the same flag for dbt deps #9100

dbeatty10 opened this issue Nov 15, 2023 · 1 comment · Fixed by #9169
Labels
deps dbt's package manager enhancement New feature or request

Comments

@dbeatty10
Copy link
Contributor

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

I don't see the need for both the flags --dry-run and --lock, they could be merged into a same flag as far as I can tell.

Originally posted by @seub in dbt-labs/docs.getdbt.com#4470 (comment)

Describe alternatives you've considered

See dbt-labs/docs.getdbt.com#4470 (comment)_ for context

Who will this benefit?

See dbt-labs/docs.getdbt.com#4470 (comment)_ for context

Are you interested in contributing this feature?

No response

Anything else?

No response

@dbeatty10 dbeatty10 added enhancement New feature or request triage labels Nov 15, 2023
@github-actions github-actions bot changed the title [Feature] Merge --dry-run and --lock into the same flag for dbt deps [CT-3395] [Feature] Merge --dry-run and --lock into the same flag for dbt deps Nov 15, 2023
@jtcohen6
Copy link
Contributor

jtcohen6 commented Nov 29, 2023

This looks basically right:

# Early return when dry run or lock only.
if self.args.dry_run or self.args.lock:
return

The only distinction I can tell is that --dry-run goes along hand-in-hand with --add-package, so like:

dbt deps --lock
dbt deps --add-package --dry-run

In theory (?), the former actually updates the lock file, whereas the latter only updates the package specification file (packages.yml) that would be added if this weren't a "dry run." I don't think this distinction is actually functional in practice. I also don't think it's such an important workflow that we must preserve it and get it working.

I prefer --lock to --dry-run. It feels like a clearer description of what's happening, and it avoids potential confusion with other "dry run" type functionality in dbt, e.g. #8971 or #7839.

@jtcohen6 jtcohen6 added deps dbt's package manager and removed triage labels Nov 29, 2023
mirnawong1 added a commit to dbt-labs/docs.getdbt.com that referenced this issue Jan 29, 2024
resolves #4622

## What are you changing in this pull request and why?

Remove `--dry-run` flag from `dbt deps`, reflecting this change:
- dbt-labs/dbt-core#9100
- dbt-labs/dbt-core#9169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps dbt's package manager enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants