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

Aspire dashboard should show CosmosDb explorer URL when running locally with an Emulator #3021

Open
MarcinJuraszek opened this issue Mar 19, 2024 · 6 comments
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure azure-cosmosdb Issues related to Azure CosmosDB
Milestone

Comments

@MarcinJuraszek
Copy link
Contributor

When adding CosmosDb to Aspire's AppHost and using an Emulator, the docker container with the emulator gets a random host port assigned every time it's started. That port isn't really shown anywhere in the portal:

Screenshot 2024-03-19 at 2 46 43 PM

Would be great if we could add emulators CosmosDb Explorer endpoint in the "Endpoints" column. Would be something like https://localhost:55869/_explorer/index.html with the right port of course, which Aspire already has access to because it's correctly including it in a connection string passed to any project that takes a dependency on the CosmosDb by WithReference.

The emulator exposes an explorer like this one:

Screenshot 2024-03-19 at 2 50 01 PM

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 19, 2024
@davidfowl davidfowl changed the title Aspire Portal should show CosmosDb explorer URL when running locally with an Emulator Aspire dashboard should show CosmosDb explorer URL when running locally with an Emulator Mar 20, 2024
@mitchdenny
Copy link
Member

This is something that is a bit easier for us to do now with some of the resource status APIs that we've added in P5. We will have an issue with a certificate warning however.

@mitchdenny mitchdenny added this to the Backlog milestone Apr 9, 2024
@davidfowl davidfowl added area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure and removed area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication labels Sep 7, 2024
@davidfowl davidfowl added azure-cosmosdb Issues related to Azure CosmosDB enhancement labels Sep 15, 2024
@swissarmykirpan
Copy link

We're quite close to making this work by doing the following:

.WithHttpsEndpoint(targetPort: 8081), however the endpoint annotations class doesn't allow us to specify a urlpath or anything.

@joperezr
Copy link
Member

joperezr commented Dec 2, 2024

We think that there will be a new emulator that will make this easier.

@davidfowl
Copy link
Member

@eerhardt Do we want to couple this to the new emulator work? #7048

@eerhardt
Copy link
Member

When you use the new emulator (after #7048 is done), and call .RunAsPreviewEmulator(e => e.WithDataExplorer()) it will show both URLs in the dashaboard:

Image

The first is the explorer:

Image

The second is the normal document endpoint:

Image

@Valkozaur
Copy link

Great work guys!
When will be the next release? Can't wait to try it out already 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure azure-cosmosdb Issues related to Azure CosmosDB
Projects
None yet
Development

No branches or pull requests

7 participants