GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-python-connector

Improve user agent logic

Open
#1,020 0 comments 0 reactions 1 assignee Assigned to @kgala2 View on GitHub
priority: p2 type: cleanup
Dominant language
Python
Stars
344
Forks
89
Avg merge
5h 33m
Merged PRs (30d)
2

Description

User agent currently is set during the first connection call. Subsequent calls have no way of updating the custom user agent. Aka if you create a connector and use it with many drivers or many custom user agents only the ones used on the first connect will be set.

Instead we should keep a `set()` of user agents and add as we go and update the client.

https://github.com/GoogleCloudPlatform/cloud-sql-python-connector/blob/bb044277e58475b3c1dfc2a497935aa97c8f2e4d/google/cloud/sql/connector/connector.py#L215-L220

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.