Skip to content

Conversation

@may-hartov
Copy link
Collaborator

This pull request refactors the validation logic for the set command across all Fabric resource types. Instead of using allowlists of supported properties, the code now uses a blocklist approach: any property can be set except those explicitly blocked (either globally or per resource). This makes the CLI more flexible and aligns it with the official REST API documentation, while still preventing updates to unsafe or unsupported properties. Documentation and error handling have also been updated to reflect this new approach.

Core validation logic changes:

  • Replaced allowlist-based validation with a blocklist approach for the set command. Now, any property can be set unless it is in a global or resource-specific blocklist, or uses filters/wildcards. This is implemented via the new validate_query_not_in_blocklist utility. [1] [2]
  • Defined a global list of invalid properties (id, type, workspaceId, folderId) that cannot be set for any resource, and added resource-specific blocklists where needed. [1] [2] [3] [4] [5] [6]

Resource command updates:

  • Updated all fab_fs_set_* command modules to use the new blocklist validation function instead of allowlist validation. Removed allowlist constants from these modules. [1] [2] [3] [4] [5] [6] [7] [8]

Gateway-specific validation improvements:

  • Refactored gateway property validation by extracting gateway type and property checks into a dedicated function, improving code clarity and maintainability. [1] [2]

Documentation and error messaging:

  • Updated documentation to explain the new blocklist approach and direct users to the REST API documentation for supported properties.
  • Improved error messages for unsupported queries in the set command.

These changes make the CLI more robust and easier to maintain, while giving users more flexibility and clearer guidance.

@may-hartov may-hartov requested a review from a team as a code owner January 29, 2026 13:42
ayeshurun
ayeshurun previously approved these changes Feb 2, 2026
@may-hartov may-hartov merged commit fde45db into microsoft:main Feb 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants