Add azure.logicappsstandard extension#8005
Conversation
…Standard extension Co-authored-by: Copilot <copilot@github.com>
Doesn't seem to be used, so this reduces number of places with version
|
Note that I don't have any prior experience with Go and with creating azd extensions. I've used the docs under https://github.com/Azure/azure-dev/tree/main/cli/azd/docs/extensions, existing extensions under https://github.com/Azure/azure-dev/tree/main/cli/azd/extensions and Copilot to create this extension. Let me know if anything needs to change. |
There was a problem hiding this comment.
Pull request overview
Adds a new first-party azure.logicappsstandard azd extension that implements a framework service provider for packaging Logic Apps Standard projects (optionally building a configured custom code .csproj), along with CI/release pipeline wiring.
Changes:
- Introduces a new Go-based extension (
azure.logicappsstandard) that registerslogicappsstandardas a framework-service-provider language and packages the service as a directory artifact. - Adds unit tests for customCodeProject detection, path validation, dotnet invocation, and packaging path selection.
- Adds GitHub Actions lint workflow and Azure DevOps release pipeline definition for the new extension.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/release-ext-azure-logicappsstandard.yml | Adds ADO release pipeline entry for the new extension. |
| .github/workflows/lint-ext-azure-logicappsstandard.yml | Adds extension-scoped Go lint workflow trigger. |
| cli/azd/extensions/azure.logicappsstandard/main.go | Extension entrypoint wiring azdext.Run(...). |
| cli/azd/extensions/azure.logicappsstandard/internal/cmd/root.go | Root command defining listen/metadata/version commands. |
| cli/azd/extensions/azure.logicappsstandard/internal/cmd/listen.go | Registers the framework service provider for logicappsstandard. |
| cli/azd/extensions/azure.logicappsstandard/internal/project/framework_service_logicappsstandard.go | Implements packaging + optional dotnet restore/build for custom code projects. |
| cli/azd/extensions/azure.logicappsstandard/internal/project/framework_service_logicappsstandard_test.go | Unit tests for provider behavior and dotnet invocation. |
| cli/azd/extensions/azure.logicappsstandard/extension.yaml | Declares extension metadata and capabilities. |
| cli/azd/extensions/azure.logicappsstandard/version.txt | Initial extension version. |
| cli/azd/extensions/azure.logicappsstandard/go.mod | New module definition and dependencies. |
| cli/azd/extensions/azure.logicappsstandard/go.sum | Dependency lockfile for the new module. |
| cli/azd/extensions/azure.logicappsstandard/build.sh | Local build script for cross-compiling extension binaries. |
| cli/azd/extensions/azure.logicappsstandard/build.ps1 | PowerShell variant of the local build script. |
| cli/azd/extensions/azure.logicappsstandard/README.md | Usage + local development docs for the extension. |
| cli/azd/extensions/azure.logicappsstandard/CHANGELOG.md | Initial changelog entry. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This reverts commit 9675a81.
…extension for consistency
…ronaldbosma/azure-dev into add-logicappsstandard-extension
…c Apps Standard Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…kServiceProvider functions Co-authored-by: Copilot <copilot@github.com>
jongio
left a comment
There was a problem hiding this comment.
All my prior findings are addressed - version.go, build script paths, CI scripts, and .golangci.yaml are all in place. The path traversal protection (resolvePathWithinBase) and nil checks are solid additions.
One remaining issue: the module rename from azure.logicappsstandard to azurelogicappsstandard (commit 4c99fcb) created a mismatch in the ldflags paths. See inline comment.
jongio
left a comment
There was a problem hiding this comment.
Build script ldflags paths now correctly target azurelogicappsstandard/internal/version, matching the Go module name. All my prior findings across both reviews are addressed. No new issues.
|
@wbreza all the feedback from both of us has been addressed. Can you take another look? |
Agent-Logs-Url: https://github.com/Azure/azure-dev/sessions/d45947bc-4f2d-4c36-a8cf-443bfa9df22b Co-authored-by: rajeshkamal5050 <11532743+rajeshkamal5050@users.noreply.github.com>
|
The However, the README examples use Consider changing the examples to lowercase for consistency: services:
logic-app:
project: ./src/logic-app
host: function
language: logicappsstandard@wbreza - can you confirm the convention here? Should service names in documentation examples stay lowercase/kebab-case? |
@jongio I've updated the readme to use lowercase in the snippets. I couldn't find a good service related sample in the documentation because they're all one word. But under https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/layered-provisioning#example-monorepo-with-multiple-services the layers use lowercase as the convention. So, I went with that. |
jongio
left a comment
There was a problem hiding this comment.
Addresses my naming convention feedback. README examples now use lowercase logicapp for service names and directories, matching the repo's convention. All findings from my previous reviews are addressed. No new issues.
|
@wbreza - all review findings have been addressed across 4 review cycles (version injection, build script paths, CI scripts, and naming conventions). This looks ready for your final approval. |
jongio
left a comment
There was a problem hiding this comment.
No new issues. The cspell addition is consistent with the lowercase naming convention fix.
|
Great work @ronaldbosma — the extension is looking solid after 4 review cycles. A few items: ✅ Naming confirmation: ✅ Convention confirmation (re: @jongio's earlier question): Lowercase/kebab-case for service names in docs is correct. The updates look good. 🟡 One change needed before approval — host validation: This is the first language extension tightly coupled to a specific host type ( I'd like to see a lifecycle event handler registered in func configureListen(host *azdext.ExtensionHost) {
host.WithFrameworkService("logicappsstandard", func() azdext.FrameworkServiceProvider {
return project.NewLogicAppsStandardFrameworkServiceProvider()
})
// Validate host compatibility early — Logic Apps Standard requires the function host
host.WithServiceEventHandler(
"prepackage",
func(ctx context.Context, event *azdext.ServiceEvent) error {
if event.ServiceConfig.Host != "function" {
return fmt.Errorf(
"Logic Apps Standard requires 'host: function' in azure.yaml, "+
"but found 'host: %s'. Update your service configuration",
event.ServiceConfig.Host,
)
}
return nil
},
&azdext.ServiceEventOptions{Language: "logicappsstandard"},
)
}This catches the misconfiguration immediately with a clear, actionable error instead of letting users get deep into the pipeline before failing. Since this is the first extension with a host constraint, it also sets a good pattern for future extensions. Everything else looks good to go — the packaging logic, path validation, and framework integration are well-implemented. Once the host validation is added, this is ready for approval. 🚀 |
… from azure.logicappsstandard extension Co-authored-by: Copilot <copilot@github.com>
|
Hi @wbreza. I've made I tried this snippet per your suggesting (with a little tweak because // Validate host compatibility early — Logic Apps Standard requires the function host
host.WithServiceEventHandler(
"prepackage",
func(ctx context.Context, args *azdext.ServiceEventArgs) error {
if args.Service.Host != "function" {
return fmt.Errorf(
"Logic Apps Standard requires 'host: function' in azure.yaml, "+
"but found 'host: %s'. Update your service configuration",
args.Service.Host,
)
}
return nil
},
&azdext.ServiceEventOptions{Language: "logicappsstandard"},
)The extension builds successfully but I got the error I also tried this simplified version: host.WithServiceEventHandler("prepackage", func(ctx context.Context, args *azdext.ServiceEventArgs) error {
return nil
}, nil)But that resulted in this error during packaging: Let me know if using the initialize method is not OK and I'll give it another go. |
jongio
left a comment
There was a problem hiding this comment.
Host validation looks good. Placing it in Initialize() is the right call - it's consistent with the existing validation pattern in that method and gives a clear, early error. The test coverage is solid.
Add
azure.logicappsstandardextension that makes it possible to package Logic Apps Standard projects. It includes support for custom code projects. It uses the host specific exclusion file (e.g..funcignore) to exclude files and folders from the package.Fixes #812. Discussed in #6956.
Design decisions
.zipfile to a Logic App succeeds.functionas host in combination withlanguage: logicappsstandardbecause Logic App Standard uses the Azure Function Runtime under the hood. This prevents the extension from silently proceeding through packaging when another host is configured and likely failing with a confusing error at deploy time.Usage
Sample usage in
azure.yamlfor Logic App project without custom code project where the./src/logicappfolder contains the Logic App assets like thehost.jsonand workflows:Sample usage in
azure.yamlfor Logic App project with custom code project (./src/logicapp/Functions/Functions.csproj), where the./src/logicApp/Workflowsfolder contains the Logic App assets like thehost.jsonand workflows: