Comments (1)
I think we're saying we want the HTTP server to strictly interact using "actions" and maybe we want the same type of system that allows you to attach actions to commands, or to server routes.
I do think this works in a world where the web server exposes the same endpoints as the command and we don't expect these two entry points to be too different. One caveat is that I have seen something play out quite differently when working on IDE integration in VS. We actually want the server to expose more than the CLI. This means exposing the very core business logic. In this world, having less layers and being able to just use any piece of code is a more important in my mind.
Just as an illustration, the only time we use actions in vsrpc is in environment_service_deploy.go.
With all that being said, I do think there's room for improvement here since we have started vsrpc consumption of azd. Looking at our current example:
// simulate cmd registration of flags and args
ioc.RegisterInstance[*cmd.ProvisionFlags](container.NestedContainer, provisionFlags)
ioc.RegisterInstance[*cmd.DeployFlags](container.NestedContainer, deployFlags)
ioc.RegisterInstance[[]string](container.NestedContainer, []string{})
// simulate cmd registration of actions by a name
container.MustRegisterNamedTransient("provisionAction", cmd.NewProvisionAction)
container.MustRegisterNamedTransient("deployAction", cmd.NewDeployAction)
// reference action by name
var c struct {
deployAction actions.Action `container:"name"`
provisionAction actions.Action `container:"name"`
}
if err := container.Fill(&c); err != nil {
return nil, err
}
c.provisionAction.Run()
It could be more natural to use an action as a class object:
provisionAction := cmd.ProvisionAction{envName: environmentName}
// resolve DI dependencies
if err := container.Fill(&provisionAction); err != nil {
return nil, err
}
provisionAction.Run()
from azure-dev.
Related Issues (20)
- azd init -t is not compatible with Aspire templates w/o azure.yaml on the root HOT 6
- Support MI for azd pipeline config + rg deployment
- Create azd videos for getting started
- [Issue] HOT 1
- [AzureTools][Aspire] Fail to publish the project using azd with the location "East US STG (eastusstg)" or "South Central US STG (southcentralusstg)" HOT 2
- pipeline config failing to validate remote with alias ssh hostnames HOT 3
- [AspireDeployment] Unsupported Azure Location are listed in AzDev CLI HOT 1
- [Issue] AZDO failure: Invalid use of relative path during infrastructure creation step of CI/CD pipeline HOT 2
- [pipeline config] Add one-time confirmation for the remote HOT 2
- [Issue] Persist current custom domain fails HOT 1
- Bicep parameters with default values are always passed as null HOT 2
- [Issue] Can't run azd down on RG with OpenAI instance HOT 2
- [Issue] azd deploy excludes node modules by default for zip deployment of node.js projects HOT 3
- [WebToolsE2E][Aspire Deployment] aspire-dashboard takes too long and errors HOT 5
- [Issue] SWA app no longer building successfully in GitHub actions HOT 6
- Add support for `args` field in `container.v0` and `container.v1` Aspire resource types HOT 1
- [Issue] azd up stuck on aspire dashboard HOT 6
- Telemetry dashboard - amplitude integration, dashboard enhancements
- Composability design - UX
- September Blogpost
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-dev.