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

Blob storage copy completion time is None #34502

Closed
hector-sab opened this issue Feb 28, 2024 · 2 comments · Fixed by #34559
Closed

Blob storage copy completion time is None #34502

hector-sab opened this issue Feb 28, 2024 · 2 comments · Fixed by #34559
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@hector-sab
Copy link
Contributor

  • Package Name: azure-storage-blob
  • Package Version: 12.19.0
  • Operating System: Linux
  • Python Version: 3.11.5

Describe the bug
When requesting the blob properties through the python sdk, the completion time of the copy information of the blob is unavailable through the CopyProperties.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Storage Account in Azure
  2. Create a Contanier
  3. Upload whatever file you want to it
  4. Run the code below and chech the properties.copy.completion_time
from azure import identity
from azure.storage import blob

credential = identity.DefaultAzureCredential()
container = 'mycontainer'
account_url = "https://myaccount.blob.core.windows.net/"
bsc = blob.BlobServiceClient(
    account_url=account_url,
    credential=credential,
)
container_client = bsc.get_container_client(container)

path = 'myfile.txt'
blob_client = container_client.get_blob_client(path)
properties = blob_client.get_blob_properties()

print(properties.copy.completion_time)  # This will show nothing as it is None

Expected behavior
The copy information contains the completion time of the copy.

Screenshots
In the srceenshot you can see the initialization of the CopyProperties dataclass and that kwargs.get('x-ms-copy-completion_time') returns nothing, but kwargs.get('x-ms-copy-completion-time') returns a datetime object
image

Additional context
I created this PR that fixes it. It is a really simple fix. #34500

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files) labels Feb 28, 2024
@kashifkhan kashifkhan added the Service Attention Workflow: This issue is responsible by Azure service team. label Feb 28, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@kashifkhan kashifkhan removed the needs-team-triage Workflow: This issue needs the team to triage. label Feb 28, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Feb 28, 2024
@vincenttran-msft
Copy link
Member

Hi @hector-sab Héctor, thanks for your inquiry! This does seem like it is simply a typo (using _ where it should be a -). I can take your pull-request fix as you have correctly identified the root cause, but I will leave some guidance on what is missing from the pull-request in the PR comments 😄
Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
4 participants