-
Notifications
You must be signed in to change notification settings - Fork 368
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
HL Python SDK: Support storage id #8742
Conversation
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.
LGTM
Thanks!
@@ -684,6 +685,16 @@ def stat(self) -> ObjectInfo: | |||
self._stats = ObjectInfo(**stat.dict()) | |||
return self._stats | |||
|
|||
def storage_id(self) -> str: | |||
""" | |||
Return the Stat object representing this object |
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.
Fix documentation
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.
Done
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.
Looking great, thanks for handling this.
Blocking only since we need to make a decision about GetConfig before merging this one.
@@ -1,5 +1,5 @@ | |||
aenum~=3.1.15 | |||
lakefs-sdk>=1.47, < 2 | |||
lakefs-sdk>=1.50, < 2 |
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.
Does this version include our latest changes regarding config defaults?
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.
What are the config defaults? How is lakeFS python SDK relevant?
As long as we are not changing the response structure this version is enough to support what we need
|
||
def __init__(self, client: Optional[Client] = None): | ||
try: | ||
self._conf = client.sdk_client.config_api.get_config() | ||
self._storage_conf = ServerStorageConfiguration(**self._conf.storage_config.dict()) | ||
if self._conf.storage_config_list is not None: |
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.
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.
How will either of the changes affect the behavior of the underlying code?
In either way to will behave in the same manner it works today
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.
Well these should be fine now.
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.
LGTM
|
||
def __init__(self, client: Optional[Client] = None): | ||
try: | ||
self._conf = client.sdk_client.config_api.get_config() | ||
self._storage_conf = ServerStorageConfiguration(**self._conf.storage_config.dict()) | ||
if self._conf.storage_config_list is not None: |
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.
Well these should be fine now.
Closes #8740
Verified with existing unit tests and manual testing