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-3568] print / no_print in profiles.yml has no effect #4776

Closed
dbeatty10 opened this issue Jan 16, 2024 · 4 comments · Fixed by #4775
Closed

[CT-3568] print / no_print in profiles.yml has no effect #4776

dbeatty10 opened this issue Jan 16, 2024 · 4 comments · Fixed by #4775
Labels
improvement Use this when an area of the docs needs improvement as it's currently unclear

Comments

@dbeatty10
Copy link
Contributor

dbeatty10 commented Jan 16, 2024

Here's the relevant documentation about the print global config:

I tried specifying print: False within profiles.yml as described in the docs, but it didn't have any effect.

So maybe it was fully deprecated sometime between dbt v1.5 and v1.7 but we didn't yet update the docs? Or maybe it was accidentally stopped working during the click migration (in dbt-labs/dbt-core#7086)?

Originally posted by @dbeatty10 in #4740 (comment)

To do

Try out the following within each of v1.5, v1.6, and v1.7. Figure out if it was fully deprecated or not and update the docs accordingly.

  1. Create this simple model file:

models/my_model.sql

{{ print("") }}
{{ print("*** Parsing, compiling, or running: " ~ this) }}
{{ print("") }}

select 1 as id
  1. Add the following config to profiles.yml:
config:
  print: False
  1. See if *** Parsing ... shows up in the logs or not:
dbt parse
@runleonarun
Copy link
Collaborator

Hey @dbeatty10, I came across a possibly related Slack convo. It maybe needs to be wrapped in a macro until it's fixed in Core?

@dbeatty10
Copy link
Contributor Author

Hey @dbeatty10, I came across a possibly related Slack convo. It maybe needs to be wrapped in a macro until it's fixed in Core?

Oooh, good call about that Slack convo 🧠

Digging into that convo deeper, it seems it is mainly related to other issues like these:

Looking at this more closely, I think this might be a bug in dbt-core, so I'm going to transfer this issue to that repo.

@dbeatty10 dbeatty10 transferred this issue from dbt-labs/docs.getdbt.com Jan 18, 2024
@github-actions github-actions bot changed the title print / no_print in profiles.yml has no effect in dbt v1.7 [CT-3568] print / no_print in profiles.yml has no effect in dbt v1.7 Jan 18, 2024
@dbeatty10
Copy link
Contributor Author

See also: dbt-labs/dbt-core#7036 (which also mentions print and would presumably resolve this issue).

@dbeatty10 dbeatty10 added the bug Something isn't working label Jan 19, 2024
@dbeatty10 dbeatty10 transferred this issue from dbt-labs/dbt-core Jan 19, 2024
@dbeatty10
Copy link
Contributor Author

After further research, I think we just need an update to the docs.

Opened #4775 to address this.

@dbeatty10 dbeatty10 added improvement Use this when an area of the docs needs improvement as it's currently unclear and removed bug Something isn't working labels Jan 19, 2024
@dbeatty10 dbeatty10 changed the title [CT-3568] print / no_print in profiles.yml has no effect in dbt v1.7 [CT-3568] print / no_print in profiles.yml has no effect Jan 19, 2024
mirnawong1 added a commit that referenced this issue Jan 23, 2024
[Preview](https://docs-getdbt-com-git-dbeatty-print-no-print-dbt-labs.vercel.app/reference/global-configs/print-output#suppress-print-messages-in-stdout)

resolves #4776

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

I checked from v1.7 back to v1.1, and I couldn't get either of these to
work in any version:

Up to 1.5:
```yaml
config:
  no_print: true
```

1.5 and after:
```yaml
config:
  print: false
```

However, the `DBT_NO_PRINT` / `DBT_PRINT` environment variables and
`--no-print` and `--print` CLI flags _do_ work.

So I think the code example for `profiles.yml` was just accidentally
introduced in the following PRs, and we should remove it because it's
not actually an option for any versions.
- #1319
- #3134

For additional context, see:
- [Upgrading to
v1.1](https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-v1.1#advanced-and-experimental-functionality)
- [Upgrading to
v1.5](https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-v1.5#behavior-changes)
- #1102
- dbt-labs/dbt-core#4701
- #3122
- #3332

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [x] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Use this when an area of the docs needs improvement as it's currently unclear
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants