functionapp: handle .funcignore more gracefully#7223
functionapp: handle .funcignore more gracefully#7223weikanglim wants to merge 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. |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
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
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