Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure provisioning in the dashboard #2552

Merged
merged 14 commits into from
Mar 2, 2024

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Feb 29, 2024

This change makes it possible (and cleaner IMO) to publish and log data about a resource to the dashboard and does that to show errors when creating resources and for showing provisioning progress when using the Aspire.Hosting.Azure.Provisioning package.  This change consolidates the previously made annotations for publishing and subscribing to both resource updates and logs general purpose services instead of annotations.

TODO:

  • - Make all azure resources work like this (I only did cosmosdb so far)
  • - Add some more tests for logic in ResourceNotificationService.

Fixes #2396
Fixes #2569
Contributes to #1758

Here's the bicep example:

image
Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Feb 29, 2024
@davidfowl davidfowl force-pushed the davidfowl/azure-provisioner-dashboard branch from 7d8d69b to 2a352e2 Compare March 1, 2024 15:46
@davidfowl davidfowl changed the title WIP Azure provisioning in the dashboard Mar 1, 2024
@davidfowl davidfowl force-pushed the davidfowl/azure-provisioner-dashboard branch from 1f6a54f to 8952fba Compare March 1, 2024 19:28
Show updates in UI from config

Remove calls from resource

Test changes

Show connection strings

WIP

Tweaks to make it work
- Return a snapshot on watch

Remove lifecycle hook

Fixed playground app

Fix tests

Remove connection strings until we get masking

Cleanup

Smaller diff

Cleanup

Small cleanup

Send updates to dashboard when resources fail to start

Post updates using NotificationService from the ApplicationExecutor
@davidfowl davidfowl force-pushed the davidfowl/azure-provisioner-dashboard branch from bd6818e to e691d7c Compare March 2, 2024 04:37
@@ -59,7 +60,9 @@ internal sealed class ApplicationExecutor(ILogger<ApplicationExecutor> logger,
IOptions<DcpOptions> options,
IDashboardEndpointProvider dashboardEndpointProvider,
IDashboardAvailability dashboardAvailability,
DistributedApplicationExecutionContext executionContext)
DistributedApplicationExecutionContext executionContext,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look more complex than they are. The main changes are moving Create{Resource}Async out to a single method so that multiple resources can be started allocated in parallel. We also publish status updates for starting and failure (if it fails to start).

- Added logging when configuration is missing from azure provisioner
@davidfowl davidfowl marked this pull request as ready for review March 2, 2024 07:08
@davidfowl
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

- Ran the bicep playground as a stress test
- Fixed bugs with not waiting properly
- Fixed issues with shownig errors after failed provisions
- Delete connection string commented out code
- Remove resouce id check
@davidfowl davidfowl enabled auto-merge (squash) March 2, 2024 10:46
@davidfowl davidfowl disabled auto-merge March 2, 2024 10:53
@davidfowl davidfowl enabled auto-merge (squash) March 2, 2024 11:17
@davidfowl davidfowl merged commit 53d0fe3 into main Mar 2, 2024
8 checks passed
@davidfowl davidfowl deleted the davidfowl/azure-provisioner-dashboard branch March 2, 2024 11:58
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2024
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
3 participants