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

[Fix] gateway auth config and azure download with offset #751

Merged
merged 2 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion skyplane/compute/azure/azure_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def credential(DefaultAzureCredential, ManagedIdentityCredential, self):
if self._credential is None:
if is_gateway_env:
print("Configured managed identity credential.")
return ManagedIdentityCredential(client_id=self.config.azure_umi_client_id)
return ManagedIdentityCredential(
client_id=self.config.azure_client_id if isinstance(self.config, SkyplaneConfig) else self.config.azure_umi_client_id
)
else:
if query_which_cloud() != "azure":
return DefaultAzureCredential(
Expand Down
2 changes: 2 additions & 0 deletions skyplane/obj_store/azure_blob_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ def download_object(
self, src_object_name, dst_file_path, offset_bytes=None, size_bytes=None, write_at_offset=False, generate_md5=False
) -> Tuple[Optional[str], Optional[bytes]]:
src_object_name, dst_file_path = str(src_object_name), str(dst_file_path)
if size_bytes is not None and offset_bytes is None:
offset_bytes = 0
downloader = self.container_client.download_blob(
src_object_name, offset=offset_bytes, length=size_bytes, max_concurrency=self.max_concurrency
)
Expand Down