GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-python-connector

Improve user agent logic

未关闭
#1,020 0 条评论 0 个 reaction 已指派 1 人 已指派给 @kgala2 在 GitHub 查看
priority: p2 type: cleanup
主要语言
Python
星标
344
派生
89
平均合并
5 小时 33 分钟
30 天内合并 PR
2

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。