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

Improve user agent logic #1020

Open
jackwotherspoon opened this issue Feb 16, 2024 · 0 comments
Open

Improve user agent logic #1020

jackwotherspoon opened this issue Feb 16, 2024 · 0 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@jackwotherspoon
Copy link
Collaborator

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.

self._client = CloudSQLClient(
self._sqladmin_api_endpoint,
self._quota_project,
self._credentials,
user_agent=self._user_agent,
driver=driver,

@jackwotherspoon jackwotherspoon added type: cleanup An internal cleanup or hygiene concern. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Feb 16, 2024
@jackwotherspoon jackwotherspoon self-assigned this Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant