Skip to content

BeforeStartEvent is too early in the pipeline for ACA / AppService resources to process compute resources #11787

@eerhardt

Description

@eerhardt

The ACA AzureContainerAppsInfrastructure hooks to BeforeStartEvent to process all the compute resources in the model.

https://github.com/dotnet/aspire/blob/b3582d25c4e134bc6c506ef178b92829eca51ba9/src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppsInfrastructure.cs#L23-L79

This event is too early in the pipeline because it doesn't give anyone else a chance to run logic before BeforeStartEvent.

For example, I want to add environment variables to a ProjectResource in an event subscription. However, since AzureContainerAppsInfrastructure hooks to BeforeStartEvent, which is the very first event that runs in the pipeline, there is no way to hook an event to add the environment variable.

cc @captainsafia @davidfowl @mitchdenny

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions