Skip to content

Allow multiple compute environment resources in an app model#8820

Merged
davidfowl merged 5 commits intomicrosoft:mainfrom
eerhardt:MultipleComputeEnv
Apr 17, 2025
Merged

Allow multiple compute environment resources in an app model#8820
davidfowl merged 5 commits intomicrosoft:mainfrom
eerhardt:MultipleComputeEnv

Conversation

@eerhardt
Copy link
Copy Markdown
Member

@eerhardt eerhardt commented Apr 16, 2025

Description

Add IComputeResource and IComputeEnvironmentResource interfaces.

This pull request introduces support for compute environment resources and how to model multiple compute environments in a single app. If there are multiple compute environments, users need to explicitly mark each compute resource .WithComputeEnvironment(env) to specify which environment is for which compute resource. An exception will be raised if there are multiple environments without specifying which one.

Contributes to #8786

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No

@github-actions github-actions Bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Apr 16, 2025
Comment thread src/Aspire.Hosting/ApplicationModel/DeploymentTargetAnnotation.cs
Comment thread src/Aspire.Hosting/ApplicationModel/ComputeEnvironmentAnnotation.cs
@eerhardt eerhardt marked this pull request as ready for review April 16, 2025 22:44
@eerhardt eerhardt requested a review from mitchdenny as a code owner April 16, 2025 22:44
Comment thread src/Aspire.Hosting/ApplicationModel/ResourceExtensions.cs Outdated
@davidfowl davidfowl merged commit bd6da41 into microsoft:main Apr 17, 2025
175 checks passed
@eerhardt eerhardt deleted the MultipleComputeEnv branch April 17, 2025 14:44
@github-actions github-actions Bot locked and limited conversation to collaborators May 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants