Skip to content

Conversation

vincenttran-msft
Copy link
Member

@vincenttran-msft vincenttran-msft commented Sep 9, 2025

TODO .tsp Changes:

  • Correct RFC (7231 -> 3339) for start/expiry

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Sep 9, 2025
Copy link

github-actions bot commented Sep 10, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure_storage_blob

@vincenttran-msft
Copy link
Member Author

vincenttran-msft commented Sep 15, 2025

Taking a look at the raw logs here, seems like we are running into a recording timestamp mismatch error due to the expiry/start being specified in AccessPolicy:

...
{"Message":"Unable to find a record for the request PUT https://Sanitized.blob.core.windows.net/containerpnruvlqr?comp=acl\\u0026restype=container\\nHeader differences:\nBody differences:\nRequest and record bodies do not match at index 111:\n request: \u0022-09-15T20:45:03.593916235Z\u003C/Ex\u0022\n record: \u0022-09-15T20:38:38.4405229Z\u003C/Expi\u0022\n
...

In Python we use a get_datetime_variable helper so that those values get taken down as variables in the recording:

    def get_datetime_variable(self, variables, name, dt):
        dt_string = variables.setdefault(name, dt.isoformat())
        return datetime.strptime(dt_string, "%Y-%m-%dT%H:%M:%S.%f")
"Variables": {
    "if_modified": "2022-07-13T23:29:50.814080"
  }

@heaths Heath, is this something that would be considered in azure_core_test in case any other crates will be running into this timestamp mismatch when testing?

@heaths
Copy link
Member

heaths commented Sep 18, 2025

At least for JSON - we could see about adding XML support, if we don't have it already - you can pass a custom matcher. In our root CONTRIBUTING.md, we link to https://github.com/Azure/azure-sdk-for-rust/blob/main/sdk/core/azure_core_test/README.md that goes into detail. This is the same test-proxy we use in all our Azure SDK languages. So whatever you've done in other languages you could do here as well.

@heaths
Copy link
Member

heaths commented Sep 18, 2025

And we already have support to read and store recorded variables if that's easier. You can pass whatever you want to that or even wrap it for ease if you want.

@vincenttran-msft
Copy link
Member Author

vincenttran-msft commented Sep 18, 2025

And we already have support to read and store recorded variables if that's easier. You can pass whatever you want to that or even wrap it for ease if you want.

How do you store recorded variables in Rust? In the current recording configuration in Rust (to my knowledge) recording.var() is looking for existing exported environment variables, and if found will add it to the variables in the recording. But is there anyway to directly set the variables that are exported from the recording?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants