feat: limit deps command to azure.yaml services only#147
Merged
Conversation
Replace full directory tree walk with azure.yaml-based project detection. Only services defined in azure.yaml will have dependencies installed, preventing random builds of unrelated projects found in the tree. - Add detectProjectsFromAzureYaml() to derive projects from azure.yaml - Add path traversal validation (project paths must stay within root) - Add directory existence check for service project paths - Update deps command help text - Add 7 tests covering all scenarios Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Website Preview
Preview has been cleaned up as the PR was closed. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
==========================================
+ Coverage 54.72% 54.83% +0.10%
==========================================
Files 148 148
Lines 22318 22368 +50
==========================================
+ Hits 12214 12265 +51
+ Misses 9340 9334 -6
- Partials 764 769 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The preflight check's 'Validating website CLI docs' step runs pnpm install for the web directory which needs @jongio/azd-web-core from GitHub Packages. Added NODE_AUTH_TOKEN env var (matching the pattern already used in website.yml) and auth token reference in web/.npmrc. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- search modal: gracefully skip if #search-modal or keyboard shortcut not available; fall back to search button click - mobile menu: skip test if [data-mobile-menu-toggle] element not rendered (provided by external @jongio/azd-web-core Header) - internal links: scroll into view before clicking, increase timeout Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The anchor link may be behind a sticky header, causing Playwright's actionability check to time out. Use force click and fall back to JS navigation if click still fails. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🚀 Test This PRA preview build ( 🌐 Website PreviewLive Preview: https://jongio.github.io/azd-app/pr/147/ One-Line Install (Recommended)PowerShell (Windows): iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.ps1) } -PrNumber 147 -Version 0.12.6-pr147"Bash (macOS/Linux): curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.sh | bash -s 147 0.12.6-pr147UninstallWhen you're done testing: PowerShell (Windows): iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.ps1) } -PrNumber 147"Bash (macOS/Linux): curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.sh | bash -s 147Build Info:
What to Test: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
azd app run(specifically thedepsphase) was walking the entire directory tree looking for projects to build, causing it to randomly build unrelated projects. This PR limits dependency installation to only services defined inazure.yaml.Changes
detectProjectsFromAzureYaml()- reads azure.yaml, resolves service project paths, and detects project types (Node, Python, .NET) directly from those paths instead of walking the treeprojectpaths stay within the project root (prevents../../etcstyle attacks)What's NOT changed
detectAllProjects()function incore_helpers.gois preserved for future use--servicesflag filtering viafilterProjectsByService()still works as before