From 619cd6afc41f186e30fd1e2abc4a95064e8f82bc Mon Sep 17 00:00:00 2001 From: Jason Horner Date: Fri, 21 Nov 2025 16:52:51 +0000 Subject: [PATCH 1/4] Add DevContainer configuration and post-create script This commit introduces a new DevContainer configuration file and a post-create PowerShell script. The configuration sets up a PowerShell development environment with essential features and extensions. The post-create script automates the installation of required PowerShell modules, ensuring a smooth setup process for developers. Thank you! --- .devcontainer/devcontainer.json | 16 +++++++++++++++ .devcontainer/post-create.ps1 | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/post-create.ps1 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..1c3aacf --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "PowerShell Dev", + "features": { + "ghcr.io/devcontainers/features/powershell:1": {}, + "ghcr.io/devcontainers/features/git:1": {} + }, + "customizations": { + "extensions": [ + "davidanson.vscode-markdownlint", + "ms-vscode.powershell", + "streetsidesoftware.code-spell-checker", + "redhat.vscode-yaml" + ] + }, + "postCreateCommand": "pwsh .devcontainer/post-create.ps1" +} diff --git a/.devcontainer/post-create.ps1 b/.devcontainer/post-create.ps1 new file mode 100644 index 0000000..8e5744f --- /dev/null +++ b/.devcontainer/post-create.ps1 @@ -0,0 +1,36 @@ +# post-create.ps1 + +Write-Host "Running DevContainer post-create setup..." + +# Ensure scripts can run +Set-ExecutionPolicy RemoteSigned -Scope Process -Force + +# Install/update PSResourceGet side-by-side +Write-Host "Installing PSResourceGet..." +Install-Module Microsoft.PowerShell.PSResourceGet -Force -AllowClobber + +# Install common modules used in this environment +$requiredModules = @( + "Pester", + "Az.Accounts" +) + +Write-Host "Installing required modules..." +foreach ($module in $requiredModules) { + Install-Module $module -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber +} + +# Validate installation +foreach ($module in $requiredModules) { + if (-not (Get-Module -ListAvailable -Name $module)) { + Write-Warning "Module [$module] did NOT install successfully!" + } +} + +# Display installed versions for debugging +Write-Host "Installed module versions:" + +Get-Module -ListAvailable | + Where-Object { $_.Name -in $requiredModules + "Microsoft.PowerShell.PSResourceGet" } | + Sort-Object Name, Version | + Format-Table Name, Version, ModuleBase From 756356a6d4b8c4e3f3f2f928b219eb25b049e917 Mon Sep 17 00:00:00 2001 From: Jason Horner Date: Fri, 21 Nov 2025 17:03:02 +0000 Subject: [PATCH 2/4] Update DevContainer configuration for FabricTools Rename the DevContainer to "FabricTools PowerShell Dev" and ensure all necessary features are included for a better development experience. This enhances clarity and usability for developers working on the FabricTools project. Thank you! --- .devcontainer/devcontainer.json | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1c3aacf..e1b2787 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,16 +1,26 @@ { - "name": "PowerShell Dev", + "name": "FabricTools PowerShell Dev", "features": { "ghcr.io/devcontainers/features/powershell:1": {}, - "ghcr.io/devcontainers/features/git:1": {} + "ghcr.io/devcontainers/features/git:1": {}, + "ghcr.io/devcontainers/features/common-utils:2": {}, + "ghcr.io/devcontainers/features/azure-cli:1": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} }, - "customizations": { - "extensions": [ - "davidanson.vscode-markdownlint", - "ms-vscode.powershell", - "streetsidesoftware.code-spell-checker", - "redhat.vscode-yaml" - ] +"customizations": { + "vscode": { + "extensions": [ + "davidanson.vscode-markdownlint", + "ms-vscode.powershell", + "streetsidesoftware.code-spell-checker", + "redhat.vscode-yaml" + ] + } }, + + "settings": { + "terminal.integrated.defaultProfile.linux": "pwsh" + }, + "postCreateCommand": "pwsh .devcontainer/post-create.ps1" } From 17477e37efcbacc0b1d78c6c3b49b62d6a63d034 Mon Sep 17 00:00:00 2001 From: Jason Horner Date: Fri, 21 Nov 2025 17:23:37 +0000 Subject: [PATCH 3/4] Fix formatting in DevContainer configuration Adjusted the indentation for the customizations section in the devcontainer.json file to ensure proper JSON structure. This change enhances readability and maintains consistency in the configuration file. Thank you! --- .devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e1b2787..016a4f3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,7 +7,8 @@ "ghcr.io/devcontainers/features/azure-cli:1": {}, "ghcr.io/devcontainers/features/github-cli:1": {} }, -"customizations": { + + "customizations": { "vscode": { "extensions": [ "davidanson.vscode-markdownlint", From 8979e7c8e43cef2cf2e245222730b0f1a491cd96 Mon Sep 17 00:00:00 2001 From: Jason Horner Date: Fri, 21 Nov 2025 17:58:42 +0000 Subject: [PATCH 4/4] Add GitHub Codespaces and DevContainer support This change introduces support for GitHub Codespaces and DevContainer, enhancing the development experience for contributors. This is a non-functional change aimed at improving setup and accessibility. Thank you! --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6bb11..80e3bce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added GitHub Codespaces and DevContainerSupport (Non Functional Change) - Added function `Update-FabricCapacity` - Added Error Detailed Info in `Test-FabricApiResponse` (Debug mode) when `response.error` exists