Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,6 @@ testResults.xml
# Downloaded from https://github.com/microsoft/fabric-rest-api-specs
# Run Update-FabricAPISpecsCache.ps1 to refresh
tools/.api-specs-cache/
tools/MicrosoftFabricMgmt/scripts/Fix-WriteFabricLogLevel.ps1
tools/MicrosoftFabricMgmt/scripts/Fix-WorkspaceAPIUris.ps1
tools/MicrosoftFabricMgmt/scripts/Refactor-PublicFunctions.ps1
136 changes: 70 additions & 66 deletions tools/MicrosoftFabricMgmt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,80 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- **Intelligent Output Formatting System**: Automatic formatting of Get-* cmdlet output with resolved GUIDs to human-readable names
- Format views for Items, Workspaces, Capacities, Domains, Role Assignments, and Jobs
- Displays: Capacity Name, Workspace Name, Item Name, Type, and ID in consistent format
- Automatic name resolution with intelligent caching for optimal performance

- **Public Helper Functions** (3 new functions exported):
- `Resolve-FabricCapacityName`: Converts capacity GUIDs to display names with caching
- `Resolve-FabricWorkspaceName`: Converts workspace GUIDs to display names with caching
- `Resolve-FabricCapacityIdFromWorkspace`: Cascading resolution for items without direct capacityId
- All functions use PSFramework configuration for caching (persists across sessions)
- Comprehensive documentation added for all three functions

- **Cascading Resolution**: Items that only return workspaceId (Lakehouse, Notebook, etc.) now display Capacity Name by cascading through workspace to get capacityId

- **Format Views** (6 views in MicrosoftFabricMgmt.Format.ps1xml):
- `FabricItemView`: For 32 item types (Lakehouse, Notebook, Warehouse, Environment, Report, etc.)
- `WorkspaceView`: For workspace objects
- `CapacityView`: For capacity objects
- `DomainView`: For domain objects
- `RoleAssignmentView`: For workspace role assignments (NEW)
- `JobView`: For job-related objects

- **Formatted Output** applied to 11 Get-* functions:
- Get-FabricLakehouse
- Get-FabricNotebook
- Get-FabricWarehouse
- Get-FabricWorkspace
- Get-FabricCapacity
- Get-FabricWorkspaceRoleAssignment (includes workspaceId for name resolution)
- Get-FabricEnvironment
- Get-FabricEventhouse
- Get-FabricApacheAirflowJob
- Get-FabricGraphQLApi
- Get-FabricEventstream

- **Documentation**:
- [Resolve-FabricCapacityName.md](docs/Resolve-FabricCapacityName.md) - Complete cmdlet documentation
- [Resolve-FabricWorkspaceName.md](docs/Resolve-FabricWorkspaceName.md) - Complete cmdlet documentation
- [Resolve-FabricCapacityIdFromWorkspace.md](docs/Resolve-FabricCapacityIdFromWorkspace.md) - Cascading resolution documentation
- [OUTPUT-FORMATTING.md](docs/OUTPUT-FORMATTING.md) - Updated with cascading resolution details
- [PHASE6_FORMATTING_COMPLETION.md](PHASE6_FORMATTING_COMPLETION.md) - Roadmap for remaining 23 functions

### Changed

- **Select-FabricResource**: Enhanced with optional `-TypeName` parameter for automatic type decoration
- **Module Manifest**: Exported 3 new public helper functions (Resolve-FabricCapacityName, Resolve-FabricWorkspaceName, Resolve-FabricCapacityIdFromWorkspace)
- **Module Manifest**: Added `FormatsToProcess = @('MicrosoftFabricMgmt.Format.ps1xml')` to load format file
- **Get-FabricWorkspaceRoleAssignment**: Now returns custom objects with workspaceId for name resolution and type decoration

### Performance Improvements

- **Intelligent Caching**: Name resolutions cached using PSFramework configuration system
- First lookup: 100-500ms (API call)
- Cached lookup: <1ms (200-500x faster!)
- Cache persists across PowerShell sessions
- Dramatically improves performance for repeated queries
- **Cascading Resolution Caching**: Both levels cached (workspace→capacityId AND capacityId→name)

### Fixed
### Deprecated
### Removed
### Security

## [1.0.2] - 2026-01-07

### Added
### Changed
Minimum PowerShell version 7.0 in module manifest.
### Fixed
### Deprecated
### Removed
Powershell 5.1 support.
### Security

## [1.0.0] - 2026-01-07
Expand Down Expand Up @@ -100,75 +169,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Previous Version Changes

## [Unreleased - 0.x]

### Added
- added unit tests for `Get-FabricWorkspaceUser` function to ensure it works correctly with multiple workspaces both in the pipeline and passed to a parameter.
- Added unit tests for Aliases for `Get-FabricWorkspaceUser` function to ensure backward compatibility.
- Added credits for authors to all functions and Unit tests to verify the existence of such tags #89

### Changed
- Updated `Get-FabricWorkspaceUser` to support pipeline input for `WorkspaceId` and `WorkspaceName` parameters.
- Renamed `Get-FabricWorkspaceUsers` to match the singular form
- Get-FabricSqlDatabase accepts Workspace as a pipeline, handles errors correctly and can filter by name (#117).

### Fixed
### Deprecated
### Removed
### Security

## 0.22.0 - 20250609

### Added

- Introduced new PowerShell functions for managing Fabric workspaces, recovery points, configurations, tenant settings, and workspace identities.
- Added unit tests for key functions, including `Get-FabricAPIclusterURI` and `Get-FabricCapacityTenantOverrides`.
- Added standard tests for each function and enhanced Help tests to filter by exported commands.
- Added OutputType attributes to several functions for improved type safety.
- Added support for WhatIf and Confirm parameters to update and revoke functions.
- Added Contributor Covenant Code of Conduct and enhanced contributing guidelines.
- Added commit message guidelines for contributors using GitHub Copilot.

### Changed

- Refactored `Get-FabricAPIClusterURI` to use `Invoke-FabricRestApi` for improved consistency.
- Updated validation pattern for `WorkspaceName` to allow additional special characters, then removed the pattern for greater flexibility.
- Improved documentation for many functions, especially around parameters like `WorkspaceId`.
- Refactored multiple functions for clarity, consistency, and maintainability.
- Enhanced error handling and confirmation prompts (ShouldProcess) for potentially destructive actions.
- Updated module manifest and build/test workflows for better automation and deployment.
- Improved code formatting using the dbatools formatter.

### Fixed

- Fixed issues with `New-FabricDataPipeline` and its call to `Invoke-FabricAPIRequest`.
- Fixed capital letter handling in test automation.
- Fixed ResourceUrl for token retrieval in `Connect-FabricAccount`.
- Fixed bugs in `New-FabricEventhouse` and improved ShouldProcess logic.
- Fixed parameter naming and example formatting in several functions.
- Fixed issue with call to `Invoke-FabricAPIRequest` from `Remove-FabricWarehouse`.

### Deprecated

- None.

### Removed

- Removed unnecessary or duplicate functions (e.g., `Get-AllFabricDatasetRefreshes`, `Get-AllFabricCapacities`).
- Removed obsolete scripts and commented-out configuration paths.
- Removed `Invoke-FabricAPIRequest` and replaced it by `Invoke-FabricRestMethodExtended`
- Removed `Confirm-FabricAuthToken`
- Renamed `Test-TokenExpired` to `Confirm-TokenState` and extended it using `EnableTokenRefresh` Feature Flag
- Removed `Set-FabricApiHeaders` and merged the entire logic to `Connect-FabricAccount`

### Security

- None.

---

**Contributors:**
Rob Sewell, Jess Pomfret, Ioana Bouariu, Frank Geisler, Kamil Nowinski, and others.
Rob Sewell, Jess Pomfret, Ioana Bouariu, Frank Geisler, and others.

**Note:**
For a full list of changes and details, please see the commit history.
Loading