Repository navigation
Correct the README on BlobServiceClient arguments - #565
Conversation
AzureBlobFileSystem builds its own BlobServiceClient and does not forward extra keyword arguments to it, so the claim that it accepts all of them was wrong (and sat under the Append Blob heading). Say what happens instead. Closes fsspec#502
anjaliratnam-msft
left a comment
There was a problem hiding this comment.
Thanks for creating a PR for this! I just had a couple small comments about the ordering/wording of it. @kyleknap Do you have any thoughts on the phrasing?
| - `sas_token` | ||
| - `tenant_id`, `client_id`, and `client_secret` are combined for an Azure ServicePrincipal e.g. `storage_options={'account_name': ACCOUNT_NAME, 'tenant_id': TENANT_ID, 'client_id': CLIENT_ID, 'client_secret': CLIENT_SECRET}` | ||
| - `anon`: bool, optional. Set to `True` to use anonymous authentication. If not set, the `AZURE_STORAGE_ANON` environment variable will be checked before defaulting to `False` where credentials are discovered on the system. | ||
| - `location_mode`: valid values are "primary" or "secondary" and apply to RA-GRS accounts |
There was a problem hiding this comment.
I agree that this doesn't belong in the append blob section but maybe instead of adding it to the end of the setting credentials section it can come right after here especially since the API reference is listed right after.
|
|
||
| ### Append Blob | ||
| The `AzureBlobFileSystem` accepts [all of the Async BlobServiceClient arguments](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python). | ||
| `AzureBlobFileSystem` creates its own `BlobServiceClient` and does not pass other [BlobServiceClient arguments](https://learn.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.aio.blobserviceclient) such as `retry_total` through to it. When no other credential is given and `anon` is False, extra keyword arguments are passed to `DefaultAzureCredential` instead. |
There was a problem hiding this comment.
If we move this earlier in the section, maybe we can shorten it to something like this:
AzureBlobFileSystemcreates its own asyncBlobServiceClientfrom the arguments listed above. OtherBlobServiceClientkeyword arguments are not passed through to it.
There was a problem hiding this comment.
@anjaliratnam-msft Yeah I agree with shortening it. I'd honestly say we could just remove the sentence all together and not even mention which blob client we use and that we don't support the keyword args? Even with the update it sort of distracts from the sentence referencing the actual accepted arguments and not sure how much value this sentence brings when the reference page is fairly thorough. Thoughts?
There was a problem hiding this comment.
Yeah, that makes sense to me. @itzzdev09 Does this sound good to you?
There was a problem hiding this comment.
Sounds good to me. I removed the sentence in fec9cca, so the PR now only drops the incorrect line from the Append Blob section and leaves the API reference to cover the accepted arguments.
Closes #502.
The README said
AzureBlobFileSystemaccepts all of the asyncBlobServiceClientarguments. It doesn't:_create_aio_blob_service_clientbuilds the client from the account URL, credential and location mode only, so arguments likeretry_totalare silently ignored, as #502 found. As @anjaliratnam-msft said there, the documentation is what's wrong.Following review, this removes the sentence from the Append Blob section rather than rewording it, since the API reference already lists the accepted arguments.
Docs only; no code change.