functionapp: handle .funcignore more gracefully#7223
functionapp: handle .funcignore more gracefully#7223rajeshkamal5050 merged 4 commits intoAzure:mainfrom
Conversation
95678ea to
130bdb7
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates Azure Function App deployments to choose remoteBuild more intelligently for flex-consumption plans by inspecting .funcignore, and to fail fast when an explicitly configured remoteBuild conflicts with .funcignore contents.
Changes:
- Add
resolveFunctionAppRemoteBuildto infer/validateremoteBuildbased on.funcignore(especiallynode_modules). - Update flex-consumption deployment path to use the new resolver and provide actionable suggestions on failure.
- Add unit tests covering JavaScript remote build decision matrix and non-JavaScript defaults.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
cli/azd/pkg/project/service_target_functionapp.go |
Introduces resolveFunctionAppRemoteBuild and wires it into flex-consumption deployments with suggestion-backed errors. |
cli/azd/pkg/project/service_target_functionapp_test.go |
Adds tests validating remote build inference/validation and language-based defaults. |
spboyer
left a comment
There was a problem hiding this comment.
Please address the copilot feedback, either comment or commit to address,
jongio
left a comment
There was a problem hiding this comment.
Good work extracting the resolution logic into a testable function and handling the .funcignore gracefully. The core logic is sound, backwards-compatible, and well-tested. A few issues to address before merge.
Dismissing: these comments duplicated existing review feedback from Copilot. Apologies for the noise.
|
@spboyer Added comments to each one of them. Please review |
ab44d41 to
eecd855
Compare
ce6789e to
1810f08
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
|
/check-enforcer override |
|
Thank you for getting this pushed today. |
The Copilot PR reviewer flagged 5 false positives on PR Azure#7223 because it didn't know about Go 1.26 features (e.g. new(expr) for pointer literals) and incorrectly flagged missing imports that existed outside the diff context. These patterns are documented in cli/azd/AGENTS.md but the PR reviewer reads .github/instructions/*.instructions.md files, not AGENTS.md. This adds a focused Go-specific instruction file that covers: - new(expr) pointer literal syntax (Go 1.26) - Other modern Go patterns that should not be flagged - Guidance to check full file context, not just diff hunks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add Unreleased section to cli/azd/CHANGELOG.md documenting: - Azure#7236: azd auth status --output json agent-friendly improvements - Azure#7223: Function App .funcignore-aware remoteBuild defaulting - Azure#7293: Windows PowerShell daily install suggestion fix - Azure#7250: Container Apps and ARM error suggestion improvements - Add azure.ai.models extension v0.0.5-preview CHANGELOG entry for Azure#7279: 403 error handling improvements in custom create Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Copilot PR reviewer flagged 5 false positives on PR #7223 because it didn't know about Go 1.26 features (e.g. new(expr) for pointer literals) and incorrectly flagged missing imports that existed outside the diff context. These patterns are documented in cli/azd/AGENTS.md but the PR reviewer reads .github/instructions/*.instructions.md files, not AGENTS.md. This adds a focused Go-specific instruction file that covers: - new(expr) pointer literal syntax (Go 1.26) - Other modern Go patterns that should not be flagged - Guidance to check full file context, not just diff hunks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* functions: use language switch for remoteBuild resolution * delete boolPtr * address feedback * do not exclude node_modules when remoteBuild: false
* functions: use language switch for remoteBuild resolution * delete boolPtr * address feedback * do not exclude node_modules when remoteBuild: false
* functions: use language switch for remoteBuild resolution * delete boolPtr * address feedback * do not exclude node_modules when remoteBuild: false
…#7316) The Copilot PR reviewer flagged 5 false positives on PR Azure#7223 because it didn't know about Go 1.26 features (e.g. new(expr) for pointer literals) and incorrectly flagged missing imports that existed outside the diff context. These patterns are documented in cli/azd/AGENTS.md but the PR reviewer reads .github/instructions/*.instructions.md files, not AGENTS.md. This adds a focused Go-specific instruction file that covers: - new(expr) pointer literal syntax (Go 1.26) - Other modern Go patterns that should not be flagged - Guidance to check full file context, not just diff hunks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#7316) The Copilot PR reviewer flagged 5 false positives on PR Azure#7223 because it didn't know about Go 1.26 features (e.g. new(expr) for pointer literals) and incorrectly flagged missing imports that existed outside the diff context. These patterns are documented in cli/azd/AGENTS.md but the PR reviewer reads .github/instructions/*.instructions.md files, not AGENTS.md. This adds a focused Go-specific instruction file that covers: - new(expr) pointer literal syntax (Go 1.26) - Other modern Go patterns that should not be flagged - Guidance to check full file context, not just diff hunks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* functions: use language switch for remoteBuild resolution * delete boolPtr * address feedback * do not exclude node_modules when remoteBuild: false
…#7316) The Copilot PR reviewer flagged 5 false positives on PR Azure#7223 because it didn't know about Go 1.26 features (e.g. new(expr) for pointer literals) and incorrectly flagged missing imports that existed outside the diff context. These patterns are documented in cli/azd/AGENTS.md but the PR reviewer reads .github/instructions/*.instructions.md files, not AGENTS.md. This adds a focused Go-specific instruction file that covers: - new(expr) pointer literal syntax (Go 1.26) - Other modern Go patterns that should not be flagged - Guidance to check full file context, not just diff hunks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* functions: use language switch for remoteBuild resolution * delete boolPtr * address feedback * do not exclude node_modules when remoteBuild: false
Currently, azd defaults
remoteBuild: truefor flex-consumption function apps. This static default causes customer pain when the.funcignorefile contents isn't compatible with the build behavior. Primarily, users scaffolding a function app project usingfunccli are impacted.To address this, we now default the
remoteBuildsetting intelligently based on the contents of the.funcignorefile. WhenremoteBuildis set explicitly, we also validate and fail fast if the.funcignoreis detected to be incompatible (i.e. the presence ofnode_modules).Fixes #6531