Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Rodriguespn
Copy link
Contributor

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

@@ -42,9 +44,6 @@ def is_jwt(token: str) -> bool:
class Manager(object):
"""SingleStoreDB manager base class."""

#: Management API version if none is specified.
Copy link
Collaborator

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.

Copy link
Contributor Author

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants