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-2171] [Feature] Add adapter(s) version(s) to the log #7038

Closed
Fleid opened this issue Feb 23, 2023 · 8 comments · Fixed by #7862
Closed

[CT-2171] [Feature] Add adapter(s) version(s) to the log #7038

Fleid opened this issue Feb 23, 2023 · 8 comments · Fixed by #7862
Assignees
Labels
enhancement New feature or request Team:Adapters Issues designated for the adapter area of the code

Comments

@Fleid
Copy link
Contributor

Fleid commented Feb 23, 2023

It would make things much easier when debugging a dbt invocation, if the adapter version were present.

Right now we get (below for a dbt debug)

============================== 2023-02-22 23:21:37.421632 | d8954cb4-b0c3-461a-a0f1-68c918c2fe23 ==============================
�[0m23:21:37.421632 [info ] [MainThread]: Running with dbt=1.4.1
�[0m23:21:37.422456 [debug] [MainThread]: running dbt with arguments {'write_json': True, 'use_colors': True, 'printer_width': 80, 'version_check': True, 'partial_parse': True, 'static_parser': True, 'profiles_dir': '/Users/fleide/.dbt', 'send_anonymous_usage_stats': True, 'quiet': False, 'no_print': False, 'cache_selected_only': False, 'config_dir': False, 'which': 'debug', 'indirect_selection': 'eager'}
...
�[0m23:21:38.799040 [debug] [MainThread]: Flushing usage events
�[0m23:21:39.154756 [debug] [MainThread]: Connection 'debug' was properly closed.

But I could be running that with dbt-bigquery 1.4.0, 1.4.1 or 1.4.2!

If we could get that info logeed (anywhere practical, it doesn't need to be at the top):

============================== 2023-02-22 23:21:37.421632 | d8954cb4-b0c3-461a-a0f1-68c918c2fe23 ==============================
�[0m23:21:37.421632 [info ] [MainThread]: Running with dbt=1.4.1
�[0m23:21:37.422456 [debug] [MainThread]: running dbt with arguments {'write_json': True, 'use_colors': True, 'printer_width': 80, 'version_check': True, 'partial_parse': True, 'static_parser': True, 'profiles_dir': '/Users/fleide/.dbt', 'send_anonymous_usage_stats': True, 'quiet': False, 'no_print': False, 'cache_selected_only': False, 'config_dir': False, 'which': 'debug', 'indirect_selection': 'eager'}
...
�[0m23:21:38.122456 [info ] [MainThread]: Running with dbt-bigquery=1.4.0
...
�[0m23:21:38.799040 [debug] [MainThread]: Flushing usage events
�[0m23:21:39.154756 [debug] [MainThread]: Connection 'debug' was properly closed.
@Fleid Fleid added enhancement New feature or request triage labels Feb 23, 2023
@github-actions github-actions bot changed the title [Feature] Add adapter(s) version(s) to the log [CT-2171] [Feature] Add adapter(s) version(s) to the log Feb 23, 2023
@Fleid
Copy link
Contributor Author

Fleid commented Feb 23, 2023

@VersusFacit that's one you may be interested in contributing to, even though that's pretty core ;)

@dbeatty10
Copy link
Contributor

@dbeatty10 dbeatty10 removed the triage label Feb 23, 2023
@jtcohen6
Copy link
Contributor

jtcohen6 commented Feb 23, 2023

yes! related older issue (which we never had the priority/capacity to pick up):

@jtcohen6 jtcohen6 added the Team:Adapters Issues designated for the adapter area of the code label Feb 23, 2023
@VersusFacit
Copy link
Contributor

VersusFacit commented Feb 24, 2023

Love me some tooling. And I certainly enjoy working on the tasks/ dir in core! 🍵

Does it make sense to roll up these two issues into a single effort?

@Fleid
Copy link
Contributor Author

Fleid commented Feb 27, 2023

@jtcohen6 I did search for an earlier similar issue, but couldn't find one.
You're good (or you've been around these parts for too long, up to you to decide which one :D)

@jtcohen6
Copy link
Contributor

Also related!

To @Fleid's point in the issue description ("anywhere practical, it doesn't need to be at the top") — we actually load the adapter a little ways in, so the point where we can know the "active" adapter version is certainly later than when we can know the installed version of dbt-core.

We need to add back telemetry for the "active" adapter's adapter_type and adapter_unique_id. We could also include the adapter_version in that telemetry, and at the same point, fire an event / log message containing any/all of those bits of info.

@VersusFacit
Copy link
Contributor

VersusFacit commented Jun 6, 2023

I think #7741 fixes this with debug as I added an output row for adapter version in the info (see this line). Do we want that info in other tasks too (in which case my PR alone would not solve this entirely)

@dbeatty10
Copy link
Contributor

Nice @VersusFacit 🤩

If possible, we'd be looking for the adapter version to be added to all tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Adapters Issues designated for the adapter area of the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants