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

[Storage] StorageManagementClient.storage_task_assignments.begin_create(...) fail with date-time format not aligned with server request. #37406

Open
blueww opened this issue Sep 14, 2024 · 2 comments
Assignees
Labels
Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@blueww
Copy link
Member

blueww commented Sep 14, 2024

Describe the bug
An external customer recently tried to use the Python SDK to create Task assignments and they are running into validation errors and Task assignment creation is not accepted.

This is because they tried to pass in date times with and without padding on "2024-09-22T19:50:32" format, which the Python SDK always Serializes converts to UTC: "2024-09-22T19:50:32.000Z" which looks to be not accepted by backend.

That is, upon calling this:

StorageManagementClient.storage_task_assignments.begin_create(...)

A log line is shown:
"Datetime with no tzinfo will be considered UTC."

Customer also shared the root cause might be because the default serializer used converts to the format:

>>> from azure.mgmt.storage._serialization import Serializer
>>> Serializer.serialize_iso("2024-09-22T19:50:32")
Datetime with no tzinfo will be considered UTC.
'2024-09-22T19:50:32.000Z'

Options:
Can SDK be updated to sync with what SRP/infra accepts? Possibly update the parameters passed to Serializer?

To Reproduce
Steps to reproduce the behavior:
see above comment.

Expected behavior
The datetime send from python SDK can be accepted by Server.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@github-actions github-actions bot added Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Sep 14, 2024
Copy link

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

@msyyc msyyc self-assigned this Sep 14, 2024
@msyyc
Copy link
Member

msyyc commented Sep 14, 2024

@blueww Could you show the specific parameter values when calling StorageManagementClient.storage_task_assignments.begin_create?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

2 participants