Skip to content

Storage STG99 Features #6622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Storage STG99 Features #6622

wants to merge 4 commits into from

Conversation

microzchang
Copy link
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?

* Share SnapshotNotFound error code support

* add test record
…riendly (#6613)

* add invalid version erorr message support

* Update find logic
* Update test records and change logs

* update change log
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 08:50
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Jun 10, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements new storage features and related tests for Azure Storage services. Key changes include:

  • Adding new tests for approximate message count behaviors in queues.
  • Refactoring internal models to handle large message counts and deprecate the old field.
  • Updating error handling for share snapshot scenarios and improving error messages.

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/storage/azure-storage-queues/test/ut/queue_client_test.cpp Added tests for ApproximateMessageCount and ApproximateMessageCountLong, including a playback-only scenario.
sdk/storage/azure-storage-queues/src/rest_client.cpp Updated the GetProperties function to use std::stoll for improved numeric conversion.
sdk/storage/azure-storage-queues/src/queue_client.cpp Adjusted GetProperties conversion with fallback logic for message counts exceeding INT32_MAX.
sdk/storage/azure-storage-files-shares/src/share_client.cpp Extended error handling to cover both ShareNotFound and ShareSnapshotNotFound cases.
Other files Updated documentation, changelogs, and internal model definitions to support the changes.
Comments suppressed due to low confidence (3)

sdk/storage/azure-storage-queues/test/ut/queue_client_test.cpp:206

  • [nitpick] The test name includes the suffix 'PLAYBACKONLY' which may not be immediately clear. Consider renaming the test to more explicitly indicate that it is only applicable in playback scenarios.
TEST_F(QueueClientTest, ApproximateMessageCountLong_PLAYBACKONLY_)

sdk/storage/azure-storage-queues/src/queue_client.cpp:172

  • Since ApproximateMessageCount is set to -1 when the internal count exceeds INT32_MAX, consider adding a comment explaining this fallback behavior to improve code clarity and maintainability.
if (ret.Value.ApproximateMessageCount > static_cast<int64_t>(INT32_MAX))

sdk/storage/azure-storage-files-shares/src/share_client.cpp:225

  • [nitpick] Adding the ShareSnapshotNotFound condition improves error handling for snapshots; consider adding an inline comment explaining why this additional error code is handled for clarity.
if (e.ErrorCode == _detail::ShareNotFound || e.ErrorCode == _detail::ShareSnapshotNotFound)

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