Skip to content
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

Update file share API according to review comments #33331

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EmmaZhu
Copy link
Member

@EmmaZhu EmmaZhu commented Mar 11, 2025

Packages impacted by this PR

Issues associated with this PR

Describe the problem that is addressed by this PR

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR? (If not, why?)

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@Copilot Copilot bot review requested due to automatic review settings March 11, 2025 02:13
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Mar 11, 2025

Choose a reason for hiding this comment

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

PR Overview

This PR updates the file share API to consolidate Linux/UNIX file metadata into a single posixProperties object rather than using separate properties for owner, group, fileMode, fileType, and linkCount. The changes span client methods, generated models, and associated tests to reflect this design consolidation.

  • Updated client methods to wrap raw responses with a unified posixProperties object.
  • Modified API model definitions and generated API documentation to remove separate NFS-related properties.
  • Adjusted tests to assert on posixProperties rather than separate fields.

Reviewed Changes

File Description
sdk/storage/storage-file-share/src/Clients.ts Updated client methods to construct posixProperties from rawResponse.
sdk/storage/storage-file-share/review/storage-file-share.api.md Modified API definitions to use posixProperties for NFS properties.
sdk/storage/storage-file-share/src/models.ts Updated the FilePosixProperties interface to include linkCount and adjusted comments.
sdk/storage/storage-file-share/src/generatedModels.ts Updated model imports and definitions to rely on posixProperties.
sdk/storage/storage-file-share/test/*.spec.ts Updated tests to assert on posixProperties instead of individual NFS properties.

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

Comments suppressed due to low confidence (3)

sdk/storage/storage-file-share/src/Clients.ts:1829

  • [nitpick] Ensure that the naming and ordering of properties within the posixProperties object (e.g., fileMode, fileType, owner, group, linkCount) matches the documentation and is consistent across all client methods.
posixProperties: {

sdk/storage/storage-file-share/review/storage-file-share.api.md:203

  • [nitpick] Confirm that the removal of separate NFS fields in favor of posixProperties is clearly documented and that the API reference accurately reflects this consolidated design.
posixProperties?: FilePosixProperties;

sdk/storage/storage-file-share/test/directoryclient.spec.ts:2543

  • [nitpick] Review the test assertions to ensure that all relevant NFS properties (including linkCount and fileType) are properly validated in both creation and retrieval scenarios.
assert.deepEqual(cResp.posixProperties?.owner, posixProperties.owner);
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

@azure/storage-file-share

Copy link
Member

@jeremymeng jeremymeng left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@blueww blueww left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants