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

add Trino Python Client version to user agent #411

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

aksakalli
Copy link
Member

Description

Trino introduces some breaking changes for old client versions but there is no way to find out the client version of our users to warn them before upgrading to a newer version since the python client is using the default user agent from requests that results python-requests/2.31.0. However, the JDBC driver sets a more descriptive user agent header value such as Trino JDBC Driver/371 that helps us to identify users with outdated client versions.

This PR aims to specify the user agent to pass the current driver version to the coordinator to be logged later in query created and completed events as io.trino.spi.eventlistener.QueryContext.userAgent.

Non-technical explanation

This change will allow us to spot outdated clients accessing our Trino cluster.

Release notes

( ) This is not user-visible or docs only and no release notes are required.
(x) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

* Add Trino Python Client version to User-Agent header. ({issue}`411`)

@hashhar hashhar merged commit 0584c93 into trinodb:master Sep 20, 2023
12 checks passed
@aksakalli aksakalli deleted the add-user-agent branch September 28, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants