Skip to content

[Storage] Hide public layout APIs while retaining managed download routing - #7518

Open
JinmingHu (Jinming-Hu) wants to merge 6 commits into
Azure:mainfrom
Jinming-Hu:storage-hide-layout-apis
Open

JinmingHu (Jinming-Hu) wants to merge 6 commits into
Azure:mainfrom
Jinming-Hu:storage-hide-layout-apis

Conversation

@Jinming-Hu

@Jinming-Hu JinmingHu (Jinming-Hu) commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.

  • C++ Guidelines
  • Doxygen docs
  • Unit tests
  • No unwanted commits/changes
  • Descriptive title/description
    • PR is single purpose
    • Related issue listed
  • Comments in source
  • No typos
  • Update changelog
  • Not work-in-progress
  • External references or docs updated
  • Self review of PR done
  • Any breaking changes?

Summary

Matches Azure/azure-sdk-for-net#64331 by hiding layout discovery and removing explicit endpoint selection from single-shot downloads. Locality-aware managed downloads stay available through LayoutAwareRouting, with no change to their behavior or defaults.

BlobClient::GetLayout becomes private, and its options, models, and paged response move into _detail namespaces in the same headers. The redundant Data Lake GetLayout wrapper and its types are removed, along with LayoutEndpoint on both single-shot download options.

Move Blob layout discovery into private implementation code and remove the public Data Lake wrappers and single-shot layout endpoint options. Retain locality-aware managed downloads and update focused tests and unreleased changelogs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
8 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The intentional removal of public Blob and Data Lake APIs requires maintainer/API approval, which the PR states has not yet been granted.

No open issues 🎉

What changed in this PR

This PR narrows the Azure Storage C++ API by making layout discovery private and removing explicit endpoint selection for single-shot downloads, while preserving locality-aware managed downloads.

Changes:

  • Moves Blob layout types and access behind a private helper and removes Data Lake layout wrappers.
  • Retains managed-download routing options, defaults, and buffer/file overloads.
  • Updates locality tests and unreleased changelogs, including Data Lake empty-layout fallback coverage.
File Description
sdk/​storage/​azure-storage-files-datalake/​test/​ut/​data_locality_test.cpp Removes wrapper tests and adds managed-download fallback and normal-endpoint checks.
sdk/​storage/​azure-storage-files-datalake/​src/​datalake_responses.cpp Removes layout paging implementation.
sdk/​storage/​azure-storage-files-datalake/​src/​datalake_file_client.cpp Removes layout discovery and explicit endpoint forwarding.
sdk/​storage/​azure-storage-files-datalake/​inc/​azure/​storage/​files/​datalake/​datalake_responses.hpp Removes public layout models and paged response.
sdk/​storage/​azure-storage-files-datalake/​inc/​azure/​storage/​files/​datalake/​datalake_options.hpp Removes layout discovery options and single-shot endpoint selection.
sdk/​storage/​azure-storage-files-datalake/​inc/​azure/​storage/​files/​datalake/​datalake_file_client.hpp Removes public GetLayout.
sdk/​storage/​azure-storage-files-datalake/​CHANGELOG.md Documents API removals and retained managed routing.
sdk/​storage/​azure-storage-blobs/​test/​ut/​data_locality_test.cpp Uses private layout access and checks normal single-shot routing.
sdk/​storage/​azure-storage-blobs/​src/​private/​data_locality.hpp Houses private layout types and accessor.
sdk/​storage/​azure-storage-blobs/​src/​private/​data_locality.cpp Uses the relocated layout range type.
sdk/​storage/​azure-storage-blobs/​src/​blob_responses.cpp Routes layout paging through the private accessor.
sdk/​storage/​azure-storage-blobs/​src/​blob_client.cpp Privatizes layout retrieval while preserving managed routing context.
sdk/​storage/​azure-storage-blobs/​inc/​azure/​storage/​blobs/​blob_responses.hpp Removes public layout models and paged response.
sdk/​storage/​azure-storage-blobs/​inc/​azure/​storage/​blobs/​blob_options.hpp Removes public layout options and single-shot endpoint selection.
sdk/​storage/​azure-storage-blobs/​inc/​azure/​storage/​blobs/​blob_client.hpp Replaces public GetLayout with private-helper friendship.
sdk/​storage/​azure-storage-blobs/​CHANGELOG.md Documents private discovery and retained managed routing.

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move layout options, models and paged responses into _detail namespaces in their original headers. Keep GetLayout private on BlobClient and DataLakeFileClient, remove the separate layout accessor, and retain managed download routing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep CreateDataLocalityLayoutState as a free function in _detail and grant it access to private GetLayout without introducing another client member or accessor class.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the factory signature into the private data locality header and replace the long friend-function declaration on BlobClient with friendship for DataLocalityLayoutState.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove DataLakeFileClient GetLayout and its layout-specific options, models and paged response. Managed downloads continue using the Blob implementation directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Jinming-Hu

Copy link
Copy Markdown
Member Author

/azp run cpp - storage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

This branch has not been deployed

No deployments
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.

2 participants