[Storage] Fix Arrow list_blobs dropping copy destination_snapshot - #48564
[Storage] Fix Arrow list_blobs dropping copy destination_snapshot#48564vincenttran-msft wants to merge 2 commits into
list_blobs dropping copy destination_snapshot#48564Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
list_blobs dropping copy destination_snapshot**list_blobs dropping copy destination_snapshot
There was a problem hiding this comment.
Pull request overview
Fixes Arrow blob listings so incremental-copy destination snapshots are preserved.
Changes:
- Corrected the Arrow copy-field mapping.
- Added a live regression test.
- Documented the fix.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
_list_blobs_helper.py |
Corrects the Arrow column mapping. |
test_arrow.py |
Tests incremental-copy snapshot parsing. |
CHANGELOG.md |
Records the bug fix. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
[Pilot] PR Pipeline Failure AnalysisA CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green. What failedThe snapshot_blob = BlobClient.from_blob_url(source_blob.url, credential=token_credential, snapshot=source_snapshot)into a multi-line call. This is the only file/check that failed. Recommended next steps
Raw pipeline analysis (azsdk ci analyze)
|
|
|
||
| @pytest.mark.live_test_only | ||
| @BlobPreparer() | ||
| def test_arrow_list_blobs_populates_copy_destination_snapshot(self, **kwargs): |
There was a problem hiding this comment.
Need the async test as well probably. But also, maybe we don't need this test, or this could be combined into another one.
Summary
When listing blobs with
response_format="arrow"andinclude=["copy"], thedestination_snapshotfield on a blob's copy properties was alwaysNone, even for incremental-copy blobs where the service populates it. The XML listing path and every other SDK path returned the value correctly. This is because the XML name was incorrectly mapped to the wrong key.list_blobs/walk_blobsalways returnedcopy.destination_snapshot = None_list_blobs_helper.py,_COPY_FIELDSmapped the Arrow column as"DestinationSnapshot", but the real wire column is"CopyDestinationSnapshot"(Copy-prefixed, like every other copy column). The lookup never matched, so the value was silently dropped."DestinationSnapshot"→"CopyDestinationSnapshot"(header valuex-ms-copy-destination-snapshotunchanged).Testing
Added a live regression test,
test_arrow_list_blobs_populates_copy_destination_snapshot, that performs a real incremental copy (page blob → snapshot → user-delegation-SAS source → incremental copy) and asserts the Arrow-parseddestination_snapshotmatches the value from the get-properties path. The column name is taken from a real service response rather than assumed.Test-Driven Development Proof
Same test, run live before updating the mapping (i.e. mapping that is in
maincurrently,DestinationSnapshot)In short, this failed because it expected a value, but was unexpectedly
Nonebecause although the value came back across the wire, it was mapped to the wrong key (DestinationSnapshot) and thus silently swallowed.The get-properties path returned
destination_snapshot = '2026-08-13T01:02:54.4473507Z', while the Arrow path returnedNone.With the fix applied, the same test now passes.
TODO: