Skip to content

[DO NOT MERGE] Migrate Storage private protocols to TypeSpec - #7495

Draft
JinmingHu (Jinming-Hu) wants to merge 6 commits into
mainfrom
jinming-hu-storage-typespec-protocols
Draft

JinmingHu (Jinming-Hu) wants to merge 6 commits into
mainfrom
jinming-hu-storage-typespec-protocols

Conversation

@Jinming-Hu

@Jinming-Hu JinmingHu (Jinming-Hu) commented Oct 20, 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

Draft, not ready to merge. Move the private Storage protocols for Blobs, Queues, File Shares, and Data Lake from AutoRest to TypeSpec. Handwritten adapters preserve the existing public clients, models, options, headers, streaming behavior, and Storage error handling. No new public API is introduced by the migration, and no related issue has been filed.

The large diff is mostly generated private code replacing the old implementations. Blob batch handling and the XML/Arrow listing readers remain handwritten. Blob and File Shares range requests intentionally use the standard Range header instead of x-ms-range; source-range and checksum headers remain unchanged.

Generation inputs

Both upstream dependencies are merged:

All four packages now pin the merged specification and consume its C++-scoped customizations directly. Package-local TypeSpec overlays and the Queue JavaScript helper are removed. Regeneration documentation points to the merged emitter, and the protocols include its optional-body Content-Type fixes. Storage explicitly opts into typed response headers with includeHeadersInResponse: true.

Azure/azure-rest-api-specs#47445 is a separate App Configuration customization, not a Storage generation dependency.

Validation

For the refreshed draft at f0331bf:

  • All five Storage test targets built on Windows x64/MSVC, Debug, with WinHTTP.
  • All 78 focused protocol/adapter tests passed: 29 Blob, 20 File Shares, 16 Data Lake, and 13 Queue.
  • Independent regeneration reproduced all 20 generated files byte-for-byte using the merged specification and emitter package sources identical to the merged revision.
  • Public headers are unchanged from the pre-migration baseline 6c25375bc97afcef5bf33947512887a942aa4c1f. This is not a comparison against newer main.
  • clang-format 11.0.0 checks passed on the nine C++ files in this refresh and the previously unpublished integration commit; Git whitespace checks passed.

Full PLAYBACK and LIVE suites were not rerun for this refresh. Earlier full PLAYBACK runs had recording mismatches from the intentional Range change; they are not a current-head pass. No recordings or Azure resources were changed. Linux/macOS, curl, shared-library ABI, and the full packaging matrix remain outstanding.

Remaining work

  • Integrate current main without losing newer Storage behavior. The branch still has merge conflicts. Newer SDK features, including Blob layout retrieval and File Shares hard-link listing/change feed, are absent from these pinned TypeSpec inputs. Resolving them needs additional protocol/specification work, not just a mechanical merge. This integration is intentionally deferred; no upstream feature has been discarded.
  • Refresh recordings for standard Range requests and pass full PLAYBACK without weakening matching.
  • Run the final integration and supported platform/transport/package checks after main integration.
  • Complete API/ABI and maintainer review before marking ready.

Generate Queues, Data Lake, File Shares, and Blob protocol clients from pinned TypeSpec inputs with C++-specific overlays. Preserve public headers, existing Storage pipelines, model compatibility, and handwritten Blob batch behavior through private adapters.

Include reproducible generation scripts, offline protocol regression coverage, changelogs, and generation documentation. Preserve fixed-width ACL timestamps and whole-second Queue delegation-key request timestamps.

Requires Azure/typespec-cpp commit f81e14cd6e09f00d89ae910c8bcfaab7c3bd347f, using committed emitter sources rather than unrelated local experiments.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Opt Storage into typed response header models and regenerate private ETag options/models with intrinsic ETag optionality. Preserve public adapters and document generation requirements.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the Storage Storage Service (Queues, Blobs, Files) label Oct 20, 2026
Reference Azure/typespec-cpp#585 at 33d83878c16f09fc0377bd326845b9c40c2a5f24, including response-header compatibility defaults and intrinsic ETag optionality. Clean PR sources reproduce all 20 checked-in protocol files.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Jinming-Hu JinmingHu (Jinming-Hu) changed the title Migrate Storage private protocols to TypeSpec [DO NOT MERGE] Migrate Storage private protocols to TypeSpec Oct 20, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Generate all four private protocols directly from the pinned Storage specs PR instead of maintaining SDK-local TypeSpec overlays. Stage the upstream Blob C++ projection and Queue decorator helper, align the response-header option, and pin the cleaned emitter history.

Regeneration changes only private documentation; public include files and runtime code remain unchanged.

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

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.

1 participant