-
Notifications
You must be signed in to change notification settings - Fork 22
feat(manager): add api versioning to manager #72
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
base: main
Are you sure you want to change the base?
feat(manager): add api versioning to manager #72
Conversation
e419a73
to
28debbf
Compare
singlestoredb/management/manager.py
Outdated
@@ -42,9 +44,6 @@ def is_jwt(token: str) -> bool: | |||
class Manager(object): | |||
"""SingleStoreDB manager base class.""" | |||
|
|||
#: Management API version if none is specified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to keep this variable in there and account for it in the constructor. There are subclasses of this class that use a different version than v1
(actually just ClusterManager
right now). But we still need this behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads up. Brought the default_version
attr back and now, on the manager constructor, self.version = version or self.default_version
. This means that unless the user explicitly specifies the api version to use, this will fallback to the default_version (global from config.py or "v1")
28debbf
to
af1421d
Compare
There are some management api endpoints that have a different api version (v2). To handle these cases, we created a new generic attribute of the Manager class that copies the manager and changes the api version