Skip to content

Commit 6b3ce09

Browse files
committed
Merge branch 'develop' into unification-api-and-tokens
2 parents 733b618 + 2a7adde commit 6b3ce09

File tree

81 files changed

+263
-139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+263
-139
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
After the description, please concisely list the changes as per keepachangelog.com
2525
This **should** duplicate what you've updated in the changelog file.
2626
27+
for example:
28+
2729
### Added
2830
- for new features [closes #15]
2931
### Changed
@@ -51,13 +53,11 @@
5153

5254
- [ ] The PR represents a single logical change. i.e. Cosmetic updates should go in different PRs.
5355
- [ ] Added an entry under the Unreleased section of in the CHANGELOG.md as per [format](https://keepachangelog.com/en/1.0.0/).
54-
- [ ] Local clean build passes without issue or fail tests (`build.ps1 -ResolveDependency`).
55-
- [ ] Resource documentation added/updated in README.md.
56-
- [ ] Resource parameter descriptions added/updated in README.md, schema.mof
57-
and comment-based help.
56+
- [ ] Local clean build passes without issue or fail tests (`build.ps1 -ResolveDependency -Tasks build, test`).
5857
- [ ] Comment-based help added/updated.
59-
- [ ] Localization strings added/updated in all localization files as appropriate.
6058
- [ ] Examples appropriately added/updated.
61-
- [ ] Unit tests added/updated. See [DSC Resource Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
62-
- [ ] Integration tests added/updated (where possible). See [DSC Resource Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
63-
- [ ] New/changed code adheres to [DSC Resource Style Guidelines](https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md) and [Best Practices](https://github.com/PowerShell/DscResources/blob/master/BestPractices.md).
59+
- [ ] Unit tests added/updated..
60+
- [ ] Integration tests added/updated (where possible).
61+
- [ ] Documentation added/updated (where applicable).
62+
ed code adheres to [DSC Resource Style Guidelines](https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md) and [Best Practices](https://github.com/PowerShell/DscResources/blob/master/BestPractices.md).
63+
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths-ignore:
6+
- CHANGELOG.md
7+
- .vscode/**
8+
- .github/**
9+
- images/**
10+
- tests/**
11+
- '**.md'
12+
- '**.yml'
13+
tags:
14+
- '**'
15+
- '!*preview*'
16+
env:
17+
buildFolderName: output
18+
buildArtifactName: output
19+
20+
permissions:
21+
contents: write # to create a release
22+
id-token: write # to use the GitHub OIDC token for authentication
23+
packages: write # to publish the module to the PowerShell Gallery
24+
pull-requests: write # to create a pull request for the changelog
25+
issues: write # to create an issue for the changelog
26+
actions: write # to allow the workflow to run actions
27+
checks: write # to allow the workflow to create checks
28+
statuses: write # to allow the workflow to create statuses
29+
30+
name: Deploy Module
31+
# This workflow is triggered on push to the main branch and deploys the module to the PowerShell Gallery and creates a GitHub Release.
32+
jobs:
33+
Build_Stage_Package_Module:
34+
name: Package Module
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout Code
38+
uses: actions/checkout@v3
39+
with:
40+
ref: ${{ github.head_ref }} # checkout the correct branch name
41+
fetch-depth: 0
42+
- name: Install GitVersion
43+
uses: gittools/actions/gitversion/[email protected]
44+
with:
45+
versionSpec: 5.x
46+
- name: Evaluate Next Version
47+
uses: gittools/actions/gitversion/[email protected]
48+
with:
49+
configFilePath: GitVersion.yml
50+
- name: Build & Package Module
51+
shell: pwsh
52+
run: ./build.ps1 -ResolveDependency -tasks pack
53+
env:
54+
ModuleVersion: ${{ env.GITVERSION_MAJORMINORPATCH }}
55+
- name: Publish Build Artifact
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: ${{ env.buildArtifactName }}
59+
path: ${{ env.buildFolderName }}/
60+
61+
Deploy_Stage_Deploy_Module:
62+
name: Deploy Module
63+
runs-on: ubuntu-latest
64+
needs:
65+
- Build_Stage_Package_Module
66+
if: ${{ success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
67+
steps:
68+
- name: Checkout Code
69+
uses: actions/checkout@v3
70+
with:
71+
ref: ${{ github.head_ref }} # checkout the correct branch name
72+
fetch-depth: 0
73+
- name: Download Build Artifact
74+
uses: actions/download-artifact@v4
75+
with:
76+
name: ${{ env.buildArtifactName }}
77+
path: ${{ env.buildFolderName }}
78+
- name: Publish Release
79+
shell: pwsh
80+
run: ./build.ps1 -tasks publish
81+
env:
82+
GitHubToken: ${{ secrets.GitHubToken }}
83+
GalleryApiToken: ${{ secrets.GalleryApiToken }}
84+
- name: Send Changelog PR
85+
shell: pwsh
86+
run: ./build.ps1 -tasks Create_ChangeLog_GitHub_PR
87+
env:
88+
GitHubToken: ${{ secrets.GitHubToken }}
89+
GalleryApiToken: ${{ secrets.GalleryApiToken }}
90+
ReleaseBranch: main
91+
MainGitBranch: main

.github/workflows/deploy-preview-module.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ env:
1919
testResultFolderName: testResults
2020

2121
name: Deploy Preview Module
22+
permissions:
23+
contents: write # to create a release
24+
id-token: write # to use the GitHub OIDC token for authentication
25+
packages: write # to publish the module to the PowerShell Gallery
26+
pull-requests: write # to create a pull request for the changelog
27+
issues: write # to create an issue for the changelog
28+
actions: write # to allow the workflow to run actions
29+
checks: write # to allow the workflow to create checks
30+
statuses: write # to allow the workflow to create statuses
31+
2232
# This workflow is triggered on push to the develop branch and deploys the module to the PowerShell Gallery as a preview version.
2333
jobs:
2434
Build_Stage_Package_Module:
@@ -70,5 +80,7 @@ jobs:
7080
shell: pwsh
7181
run: ./build.ps1 -tasks publish
7282
env:
73-
GitHubToken: ${{ secrets.GitHubToken }}
83+
GitHubToken: ${{ secrets.GITHUBTOKEN }}
7484
GalleryApiToken: ${{ secrets.GalleryApiToken }}
85+
ReleaseBranch: develop
86+
MainGitBranch: develop

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ on:
22
pull_request:
33
branches:
44
- main
5-
- sampler # temporary branch for testing
65
- develop
76
paths-ignore:
87
- CHANGELOG.md
8+
name: Build and Test Module for Pull Request
99
env:
1010
buildFolderName: output
1111
buildArtifactName: output
@@ -31,7 +31,7 @@ jobs:
3131
configFilePath: GitVersion.yml
3232
- name: Build & Package Module
3333
shell: pwsh
34-
run: ./build.ps1 -ResolveDependency -tasks pack -Verbose
34+
run: ./build.ps1 -ResolveDependency -tasks pack
3535
env:
3636
ModuleVersion: ${{ env.gitVersion.NuGetVersionV2 }}
3737
- name: Publish Build Artifact

CHANGELOG.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
### Added
99

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

1218
### Changed
1319

14-
- For changes in existing functionality.
20+
- Refactored `Get-FabricAPIClusterURI` to use `Invoke-FabricRestApi` for improved consistency.
21+
- Updated validation pattern for `WorkspaceName` to allow additional special characters, then removed the pattern for greater flexibility.
22+
- Improved documentation for many functions, especially around parameters like `WorkspaceId`.
23+
- Refactored multiple functions for clarity, consistency, and maintainability.
24+
- Enhanced error handling and confirmation prompts (ShouldProcess) for potentially destructive actions.
25+
- Updated module manifest and build/test workflows for better automation and deployment.
26+
- Improved code formatting using the dbatools formatter.
27+
28+
### Fixed
29+
30+
- Fixed issues with `New-FabricDataPipeline` and its call to `Invoke-FabricAPIRequest`.
31+
- Fixed capital letter handling in test automation.
32+
- Fixed ResourceUrl for token retrieval in `Connect-FabricAccount`.
33+
- Fixed bugs in `New-FabricEventhouse` and improved ShouldProcess logic.
34+
- Fixed parameter naming and example formatting in several functions.
1535

1636
### Deprecated
1737

18-
- For soon-to-be removed features.
38+
- None.
1939

2040
### Removed
2141

22-
- For now removed features.
42+
- Removed unnecessary or duplicate functions (e.g., `Get-AllFabricDatasetRefreshes`, `Get-AllFabricCapacities`).
43+
- Removed obsolete scripts and commented-out configuration paths.
2344

24-
### Fixed
45+
### Security
2546

26-
- For any bug fix.
47+
- None.
48+
49+
---
50+
51+
**Contributors:**
52+
Rob Sewell, Jess Pomfret, Ioana Bouariu, Frank Geisler, Kamil Nowinski, and others.
53+
54+
**Note:**
55+
For a full list of changes and details, please see the commit history.
56+
57+
### Added
2758

2859
### Security
2960

CONTRIBUTING.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,23 @@ The workflow for using this and developing the code is shown below.
8383
```PowerShell
8484
./build.ps1 -Tasks build,test
8585
```
86-
87-
8. Once you are happy with your code, push your branch to GitHub and create a PR against the repo.
86+
8. Once you are ready to submit your changes for review please ensure that you update the `CHANGELOG.md` file with a summary of your changes. This is important as it helps us keep track of what has changed in the module and makes it easier for users to see what has been added or changed.
87+
88+
You can use the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format for this.
89+
90+
Please add your changes under the `Unreleased` section and then create a new section for the next release. PLease use human readable titles for the changes, such as `Added`, `Changed`, `Fixed`, `Deprecated`, `Removed`, and `Security`.
91+
For example:
92+
93+
```markdown
94+
## [Unreleased]
95+
### Added
96+
- Added new function to manage Fabric workspaces.
97+
### Changed
98+
- Updated documentation for `Get-FabricAPIClusterURI`.
99+
### Fixed
100+
- Fixed issue with `New-FabricDataPipeline` not working correctly.
101+
```
102+
9. Once you are happy with your code and you have updated the changelog, push your branch to GitHub and create a PR against the repo.
88103

89104
## Thanks!
90105

build.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ BuildWorkflow:
7777
publish:
7878
- Publish_Release_To_GitHub # Runs first, if token is expired it will fail early
7979
# - Publish_GitHub_Wiki_Content
80-
8180
- publish_module_to_gallery
81+
# - Create_Changelog_Branch
82+
8283

8384
####################################################
8485
# PESTER Configuration #
@@ -120,16 +121,6 @@ Pester:
120121
#CodeCoverageFilePattern: JaCoCo_Merge.xml # the pattern used to search all pipeline test job artifacts
121122
#CodeCoverageMergedOutputFile: JaCoCo_coverage.xml # the file that is created for the merged code coverage
122123

123-
DscTest:
124-
ExcludeTag:
125-
- "Common Tests - New Error-Level Script Analyzer Rules"
126-
Tag:
127-
ExcludeSourceFile:
128-
- output
129-
ExcludeModuleFile:
130-
- Modules/DscResource.Common
131-
# - Templates
132-
133124
# Import ModuleBuilder tasks from a specific PowerShell module using the build
134125
# task's alias. Wildcard * can be used to specify all tasks that has a similar
135126
# prefix and or suffix. The module contain the task must be added as a required
@@ -152,3 +143,18 @@ TaskHeader: |
152143
Write-Build DarkGray " $Path"
153144
Write-Build DarkGray " $($Task.InvocationInfo.ScriptName):$($Task.InvocationInfo.ScriptLineNumber)"
154145
""
146+
####################################################
147+
# Changelog Configuration #
148+
####################################################
149+
ChangelogConfig:
150+
FilesToAdd:
151+
- 'CHANGELOG.md'
152+
UpdateChangelogOnPrerelease: false
153+
154+
####################################################
155+
# Git Configuration #
156+
####################################################
157+
GitConfig:
158+
UserName: Automation Bot
159+
UserEmail: [email protected]
160+

source/FabricTools.psd1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#
22
# Module manifest for module 'FabricTools'
33
#
4-
# Generated by: mrrob
4+
# Generated by: The FabricTools Team
55
#
6-
# Generated on: 08/05/2025
6+
# Generated on: 26/05/2025
77
#
88

99
@{
@@ -60,16 +60,16 @@ RequiredModules = @(
6060
@{ ModuleName = 'Az.Resources' ; ModuleVersion = '6.15.1' }
6161
)
6262

63-
# Assemblies that must be loaded prior to importing this module
63+
# Assemblies that must be loaded prior to importing this module.
6464
# RequiredAssemblies = @()
6565

66-
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
66+
# Script files (.ps1) that are run in the caller's environment prior to importing this module
6767
# ScriptsToProcess = @()
6868

6969
# Type files (.ps1xml) to be loaded when importing this module
7070
# TypesToProcess = @()
7171

72-
# Format files (.ps1xml) to be loaded when importing this module
72+
# Format files (.ps1xml) to be loaded when importing this module.
7373
# FormatsToProcess = @()
7474

7575
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
@@ -136,3 +136,4 @@ HelpInfoURI = 'https://www.github.com/dataplat/FabricTools'
136136
# DefaultCommandPrefix = ''
137137

138138
}
139+

source/Public/Capacity/Get-FabricCapacities.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,4 @@ function Get-FabricCapacities {
7272
# Return the results
7373
return $res
7474
}
75+

0 commit comments

Comments
 (0)