Make fully featured dev container easier to get started with#1471
Make fully featured dev container easier to get started with#1471SamErde wants to merge 28 commits intomaester365:mainfrom
Conversation
Snyk has created this PR to upgrade @headlessui/react from 2.2.0 to 2.2.9. See this package in npm: @headlessui/react See this project in Snyk: https://app.snyk.io/org/samerde/project/c3ecdc34-9da6-49df-8976-bdac2da5fb50?utm_source=github&utm_medium=referral&page=upgrade-pr
Snyk has created this PR to upgrade @remixicon/react from 4.7.0 to 4.8.0. See this package in npm: @remixicon/react See this project in Snyk: https://app.snyk.io/org/samerde/project/c3ecdc34-9da6-49df-8976-bdac2da5fb50?utm_source=github&utm_medium=referral&page=upgrade-pr
Snyk has created this PR to upgrade @easyops-cn/docusaurus-search-local from 0.40.1 to 0.52.2. See this package in npm: @easyops-cn/docusaurus-search-local See this project in Snyk: https://app.snyk.io/org/samerde/project/d19c3169-fa2c-4065-be3e-f0e296c7b29b?utm_source=github&utm_medium=referral&page=upgrade-pr
…ficiency - Remove full build of website and report to save startup time. - Remove python3 and build-essential packages to significantly improve startup time.
…n postCreateCommand.sh
…ic and enhance output patterns
There was a problem hiding this comment.
Pull request overview
Improves the dev container onboarding experience by upgrading the base image, adding validation and VS Code automation, and updating a few frontend dependencies.
Changes:
- Added a PowerShell validation script and wired it into devcontainer post-create + VS Code tasks.
- Updated devcontainer image/features, forwarded ports, and VS Code settings/tasks for smoother workflows.
- Bumped select website/report npm dependencies.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| website/package.json | Updates local search plugin dependency version. |
| report/package.json | Updates report UI dependencies to newer versions. |
| .vscode/tasks.json | Adds one-click tasks for starting services and validating the container. |
| .vscode/settings.json | Enforces consistent formatting and ESLint formatting integration. |
| .devcontainer/postCreateCommand.sh | Expands setup steps and runs validation after container creation. |
| .devcontainer/devcontainer.json | Upgrades Node image, adds features/modules, and improves customizations/ports. |
| .devcontainer/Validate-DevContainer.ps1 | New script to validate required tools, modules, structure, and npm installs. |
Files not reviewed (2)
- report/package-lock.json: Language not supported
- website/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated 7 comments.
Files not reviewed (2)
- report/package-lock.json: Language not supported
- website/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| Write-Host "✗ $($args[0])" -ForegroundColor Red | ||
| } | ||
|
|
||
| function Write-Warning { |
There was a problem hiding this comment.
Defining a function named Write-Warning shadows PowerShell’s built-in Write-Warning cmdlet, which can lead to surprising behavior (no -WarningAction, ignores $WarningPreference, etc.). Use a different function name (e.g., Write-ValidationWarning) and update call sites.
| function Write-Warning { | |
| function Write-ValidationWarning { |
| exit 1 | ||
| } | ||
| } | ||
| } catch { | ||
| Write-ErrorMessage "Failed to parse manifest $($file.FullName): $($_.Exception.Message)" | ||
| exit 1 | ||
| } | ||
| } | ||
| Write-Host "`n✅ PowerShell dependencies validated successfully." -ForegroundColor Green |
There was a problem hiding this comment.
This loop calls exit 1 on the first missing module / manifest parse error, which bypasses the script’s $allValid aggregation and the summary section. Prefer setting $allValid = $false and continuing (or throwing and letting a single catch handle termination) so the script reports all missing dependencies consistently.
| exit 1 | |
| } | |
| } | |
| } catch { | |
| Write-ErrorMessage "Failed to parse manifest $($file.FullName): $($_.Exception.Message)" | |
| exit 1 | |
| } | |
| } | |
| Write-Host "`n✅ PowerShell dependencies validated successfully." -ForegroundColor Green | |
| $allValid = $false | |
| } | |
| } | |
| } catch { | |
| Write-ErrorMessage "Failed to parse manifest $($file.FullName): $($_.Exception.Message)" | |
| $allValid = $false | |
| } | |
| } | |
| if ($allValid) { | |
| Write-Host "`n✅ PowerShell dependencies validated successfully." -ForegroundColor Green | |
| } |
| # Install Node.js dependencies with reproducible lock files | ||
| # echo "" | ||
| # echo "Installing Node.js dependencies..." | ||
| # echo "Installing website dependencies..." | ||
| # cd ./website && npm ci > /dev/null | ||
|
|
||
| # echo "Installing report dependencies..." | ||
| # cd ./report && npm ci > /dev/null | ||
|
|
||
| # Run dev container validation | ||
| echo -e "\nRunning dev container validation..." | ||
| pwsh -NoProfile -File ./.devcontainer/Validate-DevContainer.ps1 | ||
|
|
There was a problem hiding this comment.
postCreateCommand.sh runs Validate-DevContainer.ps1, but the npm install steps are commented out, and the validator currently fails when node_modules is missing. This will cause postCreateCommand to fail on a fresh devcontainer build. Either re-enable npm ci here before validation, or adjust the validator to not fail on missing node_modules during first-time setup.
| "@docusaurus/theme-mermaid": "^3.9.2", | ||
| "@easyops-cn/docusaurus-search-local": "^0.40.1", | ||
| "@easyops-cn/docusaurus-search-local": "^0.52.2", | ||
| "@fortawesome/fontawesome-svg-core": "^6.5.1", |
There was a problem hiding this comment.
Bumping @easyops-cn/docusaurus-search-local to 0.52.2 pulls in transitive dependencies that declare engines.node >= 20.18.1 (per website/package-lock.json). The website/package.json engines.node currently allows >=18, which is now misleading for contributors. Update the engines.node range to match the actual minimum supported Node version.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
This PR updates the dev container configuration to make it usable as a fully featured environment that is easy to get started with.
Dev Container and Setup Improvements:
Validate-DevContainer.ps1) to check for required PowerShell modules, Node.js, npm, Git, directory structure, and installed npm packages, improving reliability and onboarding for new contributors.devcontainer.json) by upgrading the Node.js image to version 20, adding more PowerShell modules, enabling Git, and improving VS Code customizations and port forwarding.postCreateCommand.sh) to install additional system dependencies, run the new validation script, and provide clear setup instructions for all project components.Developer Productivity and Quality of Life:
tasks.json) for starting the website and report, and validating dependencies, enabling one-click development workflows.settings.json) to enforce consistent formatting for PowerShell, JavaScript, and TypeScript, and improved ESLint integration.Dependency Upgrades:
report/package-lock.json(e.g.,@headlessui/react,@remixicon/react,@floating-ui/core, and related packages) for improved stability and security. [1] [2] [3] [4]These changes collectively improve the reliability, maintainability, and ease of use for both new and existing contributors working in the Maester development environment.
Contribution Checklist
Before submitting this PR, please confirm you have completed the following:
/powershell/tests/pester.ps1on your local system.