Repository navigation
Migrate Queue private protocol layer to TypeSpec - #7510
Merged
JinmingHu (Jinming-Hu) merged 14 commits intoOct 30, 2026
Merged
Conversation
Extract only azure-storage-queues from the combined Storage migration. Preserve public headers and reuse the existing Storage pipeline and models. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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. |
Remove historical Swagger configuration and repository generation instructions/configuration. Drop the transparent internal migration changelog entry; retain generated runtime code, adapters and tests unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve all 26 public model types and bitwise operators in queue_models.hpp. Remove obsolete private protocol declarations and relocate the unchanged default API version. Update public includes and packaging, and cover model defaults and enums. The removal of azure/storage/queues/rest_client.hpp is an explicitly accepted source-breaking include-path change; no forwarding header is retained. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move preserved public model declarations and operators into queue_responses.hpp and remove queue_models.hpp. Define the unchanged ListQueuesOptions alongside its paged response to keep header dependencies one-way and preserve layout. Update public includes, build list, and direct-header tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add the missing terminal newline to queue_responses.hpp. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the standard Storage pipeline and retain generated XML headers. Update offline protocol assertions for the intended headers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move the unchanged invocation helper to an installed Common internal header, add generic tests, and require the existing next Common version from Queue. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the Common helper and Queue runtime unchanged; leave vcpkg and dependency version updates to the release pipeline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add model-only coverage for Queue properties, service defaults, case-insensitive metadata, and explicit message result values. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pin header-only Queue recording updates: add XML Accept on XML-response operations and retain generated application/xml Content-Type for XML request bodies. Preserve bodies, responses and default proxy matching. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Allow numofmessages through the established package-local CSpell dictionary pattern without changing generated names, global dictionaries or exclusions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The protocol replacement and accepted header removal require maintainer compatibility review, broader platform validation, and coordinated Storage Common release availability.
No open issues 🎉
What changed in this PR
Migrates Queue’s private protocol layer from AutoRest to TypeSpec, independently of the broader Storage migration in #7495. Handwritten adapters retain public model behavior, while removal of rest_client.hpp is an explicitly accepted source-breaking change.
Changes:
- Adds private generated protocol types and adapters, plus a shared Storage Common exception-conversion helper.
- Relocates public models and flags, updates includes and build registration, and removes legacy protocol code and Swagger configuration.
- Adds model regression tests, updates Queue playback assets, and introduces a package-local spelling entry.
| File | Description |
|---|---|
sdk/storage/azure-storage-queues/test/ut/queue_models_test.cpp |
Tests model defaults, metadata, message results, and enums. |
sdk/storage/azure-storage-queues/test/ut/CMakeLists.txt |
Registers model tests. |
sdk/storage/azure-storage-queues/swagger/README.md |
Removes legacy AutoRest configuration. |
sdk/storage/azure-storage-queues/src/rest_client.cpp |
Removes the legacy protocol implementation. |
sdk/storage/azure-storage-queues/src/queue_service_client.cpp |
Routes service operations through generated code and adapters. |
sdk/storage/azure-storage-queues/src/queue_sas_builder.cpp |
Replaces the deleted header include. |
sdk/storage/azure-storage-queues/src/queue_responses.cpp |
Defines relocated public replication-status constants. |
sdk/storage/azure-storage-queues/src/queue_client.cpp |
Adapts queue and message operations to generated protocols. |
sdk/storage/azure-storage-queues/src/private/queue_model_conversions.hpp |
Converts between public and private generated models. |
sdk/storage/azure-storage-queues/src/generated/queues.cpp |
Defines private generated enumeration constants. |
sdk/storage/azure-storage-queues/src/generated/queues_models.hpp |
Adds private protocol models and response headers. |
sdk/storage/azure-storage-queues/src/generated/queues_client.hpp |
Declares the private generated client. |
sdk/storage/azure-storage-queues/src/generated/queues_client_options.hpp |
Defines generated client and operation options. |
sdk/storage/azure-storage-queues/inc/azure/storage/queues/rest_client.hpp |
Removes the installed legacy protocol header without a shim. |
sdk/storage/azure-storage-queues/inc/azure/storage/queues/queue_responses.hpp |
Houses public models formerly in the legacy header. |
sdk/storage/azure-storage-queues/inc/azure/storage/queues/queue_options.hpp |
Houses listing flags and preserves the default API version. |
sdk/storage/azure-storage-queues/inc/azure/storage/queues/queue_client.hpp |
Adds explicit Core includes previously supplied transitively. |
sdk/storage/azure-storage-queues/inc/azure/storage/queues.hpp |
Removes the legacy header from the umbrella include. |
sdk/storage/azure-storage-queues/cspell.json |
Allows the Queue-specific numofmessages spelling. |
sdk/storage/azure-storage-queues/CMakeLists.txt |
Registers generated sources and removes legacy files. |
sdk/storage/azure-storage-common/inc/azure/storage/common/internal/storage_protocol.hpp |
Adds shared protocol exception conversion. |
sdk/storage/azure-storage-common/CMakeLists.txt |
Registers the installed internal helper header. |
sdk/storage/assets.json |
Pins recordings updated for Queue request headers. |
Review effort: Balanced
Regenerate private documentation with the scoped emitter documentation fix: use safe Markdown links and omit an empty class brief. Document the four public list flags operators without changing declarations or runtime tokens. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run cpp - storage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Preserve the recordings added by #7483 and update Queue request headers for the TypeSpec protocol, including the newly enabled playback tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run cpp - storage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Anton Kolesnyk (antkmsft)
approved these changes
Oct 27, 2026
JinmingHu (Jinming-Hu)
deleted the
jinming-hu-queue-typespec-migration
branch
October 30, 2026 00:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces Queue's AutoRest protocol layer with private TypeSpec-generated code and handwritten adapters. This is the Queue-only part of #7495; other Storage services are unchanged. Public client signatures, model layouts/defaults, and the default API version stay the same.
The old
rest_client.hppis removed. Code including it directly should usequeue_responses.hpporqueues.hpp; code relying on response models throughqueue_options.hppalso needs one of those headers. Generated code now requires validDateandx-ms-versionsuccess-response headers and rejects empty message IDs locally.Adds a shared internal exception adapter in Storage Common, model tests, and updated Queue playback request headers. Common containing the new helper must ship before the dependent Queue release. Version and dependency updates are left to the release pipeline.
Uses the merged TypeSpec changes in Azure/azure-rest-api-specs#47555 and Azure/typespec-cpp#585. The additional documentation-generation fix is tracked separately in Azure/typespec-cpp#586 and does not block this PR.
Merged current main after #7483 and preserved its recordings in assets tag
cpp/storage_a6149e4c39. Only Queue request headers were changed; responses, bodies, and other packages are unchanged. All five Storage suites passed against the clean published tag in PLAYBACK mode: 494 passed, 118 expected LIVE-only skips, zero failures (Queue: 33 passed). CI is rerunning for this merge update; the previous head passed Core and Storage CI.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.