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

Add support for CosmosDB vnext-preview emulator #7048

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Jan 8, 2025

Added a new experimental API - RunAsPreviewEmulator. This will use the new Linux-based emulator, which starts faster. And it also has support for a built-in Data Explorer which can be enabled by calling WithDataExplorer on the emulator.

Fix #5163

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?

Added a new experimental API - RunAsPreviewEmulator. This will use the new Linux-based
emulator, which starts faster. And it also has support for a built-in Data Explorer
which can be enabled by calling WithDataExplorer on the emulator.

Fix dotnet#5163

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 9 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • src/Aspire.Hosting.Azure.CosmosDB/PublicAPI.Shipped.txt: Language not supported
  • src/Aspire.Hosting.Azure.CosmosDB/PublicAPI.Unshipped.txt: Language not supported
  • src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBEmulatorConnectionString.cs: Evaluated as low risk
  • src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBEmulatorResource.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

playground/CosmosEndToEnd/CosmosEndToEnd.ApiService/Program.cs:23

  • The partition key path was changed from /Id to /id. If the partition key is case-sensitive, this change could lead to unexpected behavior or errors.
var container = (await db.CreateContainerIfNotExistsAsync("entries", "/id")).Container;
@Pilchie
Copy link
Member

Pilchie commented Jan 9, 2025

Also tagging @christopheranderson

/// </remarks>
public static IResourceBuilder<AzureCosmosDBEmulatorResource> WithDataExplorer(this IResourceBuilder<AzureCosmosDBEmulatorResource> builder, int? port = null)
{
if (!builder.Resource.InnerResource.IsPreviewEmulator)
Copy link
Member

Choose a reason for hiding this comment

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

Why?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because it doesn't work in the latest emulator. See Azure/azure-cosmos-db-emulator-docker#135.

Also fixing the EF CosmosDB code to specify the PartitionKey.
@eerhardt
Copy link
Member Author

eerhardt commented Jan 9, 2025

@Pilchie @christopheranderson - it looks like the vnext-preview emulator is failing to start in CI sometimes:

[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Information: 6: 2025-01-09T22:35:18.2745260Z Generating certificate
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 7: 2025-01-09T22:35:18.5100789Z .................................................................................................................................................................+++++
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 8: 2025-01-09T22:35:18.5210439Z Generating a RSA private key
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 9: 2025-01-09T22:35:18.5397142Z .........................+++++
[2025-01-09T22:35:18] Aspire.Hosting.ApplicationModel.ResourceNotificationService Trace: Resource cosmos/cosmos-yaemxhyx-8f2b8cf update published: ResourceType = Container, CreationTimeStamp = 2025-01-09T22:35:13, State = { Text = Running, Style = (null) }, ExitCode = (null), EnvironmentVariables = { CERTS_ROOT = /scripts/certs, CERT_PATH = /scripts/certs/domain.pfx, CERT_SECRET = secret, COSMOS_EMULATOR_RELEASE_VERSION = 5e7ad955d634f2a882c4be3f4f5c17b51f029c68, DATA_PATH = /data, ENABLE_EXPLORER = true, ENABLE_TELEMETRY = true, EXPLORER_PORT = 1234, EXPLORER_PROTOCOL = PROTOCOL, GATEWAY_PUBLIC_ENDPOINT = , INSTALL_DEPENDENCIES_ROOT = /root/, LANGUAGE = en_US, LOG_LEVEL = info, ORIGINAL_USER = , PATH = /home/cosmosdev/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/16/bin, PG_VERSION_USED = 16, PORT = 8081, PROTOCOL = http, TERM = xterm-256color, WORKSPACE_ROOT = /home/cosmosdev, workspaceFolder = /home/cosmosdev }, Urls = { emulator = http://localhost:36661, emulator target port = http://127.0.0.1:32791 }, Properties = { container.image = mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview, container.id = b35f79b6a3afaef3bd4b950e0da8e118830b2dbf9d854ab5dda87b1d78211b97, container.command = , container.args = System.Collections.Generic.List`1[System.String], container.ports = System.Collections.Immutable.ImmutableArray`1[System.Int32], container.lifetime = Session }
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 10: 2025-01-09T22:35:18.5883815Z ....................................................................+++++
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 11: 2025-01-09T22:35:18.5887645Z writing new private key to '/scripts/certs/rootCA.key'
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 12: 2025-01-09T22:35:18.5889839Z -----
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 13: 2025-01-09T22:35:18.6145805Z Signature ok
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 14: 2025-01-09T22:35:18.6147477Z subject=C = US, ST = WA, O = SqlPostgresHostConsole, CN = localhost
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Error: 15: 2025-01-09T22:35:18.6149886Z Getting CA Private Key
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Information: 16: 2025-01-09T22:35:18.6363024Z /root/cosmos-explorer ~
[2025-01-09T22:35:18] Aspire.Hosting.Tests.Resources.cosmos Information: 17: 2025-01-09T22:35:18.6363265Z ~
[2025-01-09T22:35:22] Aspire.Hosting.ApplicationModel.ResourceNotificationService Trace: Resource cosmos/cosmos-yaemxhyx-8f2b8cf update published: ResourceType = Container, CreationTimeStamp = 2025-01-09T22:35:13, State = { Text = Running, Style = (null) }, ExitCode = (null), EnvironmentVariables = { CERTS_ROOT = /scripts/certs, CERT_PATH = /scripts/certs/domain.pfx, CERT_SECRET = secret, COSMOS_EMULATOR_RELEASE_VERSION = 5e7ad955d634f2a882c4be3f4f5c17b51f029c68, DATA_PATH = /data, ENABLE_EXPLORER = true, ENABLE_TELEMETRY = true, EXPLORER_PORT = 1234, EXPLORER_PROTOCOL = PROTOCOL, GATEWAY_PUBLIC_ENDPOINT = , INSTALL_DEPENDENCIES_ROOT = /root/, LANGUAGE = en_US, LOG_LEVEL = info, ORIGINAL_USER = , PATH = /home/cosmosdev/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/16/bin, PG_VERSION_USED = 16, PORT = 8081, PROTOCOL = http, TERM = xterm-256color, WORKSPACE_ROOT = /home/cosmosdev, workspaceFolder = /home/cosmosdev }, Urls = { emulator = http://localhost:36661, emulator target port = http://127.0.0.1:32791 }, Properties = { container.image = mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview, container.id = b35f79b6a3afaef3bd4b950e0da8e118830b2dbf9d854ab5dda87b1d78211b97, container.command = , container.args = System.Collections.Generic.List`1[System.String], container.ports = System.Collections.Immutable.ImmutableArray`1[System.Int32], container.lifetime = Session }
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 18: 2025-01-09T22:35:23.6465012Z DocDBTrace Information: 0 : Npgsql Non-Transaction settings -c idle_in_transaction_session_timeout=60000 -c statement_timeout=60000 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 19: 2025-01-09T22:35:23.6465433Z DocDBTrace Warning: 0 : Non-HTTPS request detected.
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 20: 2025-01-09T22:35:23.6465507Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 0, retryDelayinMs: 10.5706 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 21: 2025-01-09T22:35:23.6465560Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 1, retryDelayinMs: 10.5477 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 22: 2025-01-09T22:35:23.6465607Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 2, retryDelayinMs: 8.8395 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 23: 2025-01-09T22:35:23.6465658Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 3, retryDelayinMs: 82.4039 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 24: 2025-01-09T22:35:23.6465706Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 4, retryDelayinMs: 93.86 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 25: 2025-01-09T22:35:23.6465754Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 5, retryDelayinMs: 172.4351 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 26: 2025-01-09T22:35:23.6465806Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 6, retryDelayinMs: 448.9992 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 27: 2025-01-09T22:35:23.6465858Z DocDBTrace Warning: 0 : Non-HTTPS request detected.
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 28: 2025-01-09T22:35:23.6465904Z npm warn using --force Recommended protections disabled.
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 29: 2025-01-09T22:35:23.6465953Z 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 30: 2025-01-09T22:35:23.6466000Z > [email protected] start
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 31: 2025-01-09T22:35:23.6466054Z > webpack serve --mode development
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 32: 2025-01-09T22:35:23.6466100Z 
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 33: 2025-01-09T22:35:23.6466146Z AZURE_CLIENT_SECRET is not set. testExplorer.html will not work.
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 34: 2025-01-09T22:35:23.6466193Z [webpack-cli] No need to use the 'serve' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 35: 2025-01-09T22:35:23.6483505Z fixing permissions on existing directory /data/db ... ok
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 36: 2025-01-09T22:35:23.6483687Z creating subdirectories ... ok
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 37: 2025-01-09T22:35:23.6483751Z selecting dynamic shared memory implementation ... posix
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 38: 2025-01-09T22:35:23.6483801Z selecting default max_connections ... 100
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 39: 2025-01-09T22:35:23.6483843Z selecting default shared_buffers ... 128MB
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 40: 2025-01-09T22:35:23.6483889Z selecting default time zone ... UTC
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 41: 2025-01-09T22:35:23.6483934Z creating configuration files ... ok
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 42: 2025-01-09T22:35:23.6483975Z running bootstrap script ... ok
[2025-01-09T22:35:23] Aspire.Hosting.Tests.Resources.cosmos Information: 43: 2025-01-09T22:35:23.6484119Z performing post-bootstrap initialization ... ok
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 44: 2025-01-09T22:35:24.6492870Z syncing data to disk ... DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 0, retryDelayinMs: 11.6473 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 45: 2025-01-09T22:35:24.6493227Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 1, retryDelayinMs: 7.5387 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 46: 2025-01-09T22:35:24.6493299Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 2, retryDelayinMs: 13.3398 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 47: 2025-01-09T22:35:24.6493350Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 3, retryDelayinMs: 49.0125 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 48: 2025-01-09T22:35:24.6493398Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 4, retryDelayinMs: 60.9977 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 49: 2025-01-09T22:35:24.6493445Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 7, retryDelayinMs: 236.3194 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 50: 2025-01-09T22:35:24.6493493Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 5, retryDelayinMs: 166.2137 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 51: 2025-01-09T22:35:24.6493535Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 6, retryDelayinMs: 270.33 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 52: 2025-01-09T22:35:24.6493579Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 8, retryDelayinMs: 1000 
[2025-01-09T22:35:24] Aspire.Hosting.Tests.Resources.cosmos Information: 53: 2025-01-09T22:35:24.6493623Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 7, retryDelayinMs: 1000 
[2025-01-09T22:35:25] Aspire.Hosting.Tests.Resources.cosmos Information: 54: 2025-01-09T22:35:25.6494521Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 9, retryDelayinMs: 1000 
[2025-01-09T22:35:25] Aspire.Hosting.Tests.Resources.cosmos Information: 55: 2025-01-09T22:35:25.6494838Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 8, retryDelayinMs: 1000 
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 56: 2025-01-09T22:35:26.6450711Z <i> [webpack-dev-server] [HPM] Proxy created: /api  -> https://cdb-ms-mpac-pbe.cosmos.azure.com
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 57: 2025-01-09T22:35:26.6451047Z <i> [webpack-dev-server] [HPM] Proxy created: /proxy  -> https://cdb-ms-mpac-pbe.cosmos.azure.com
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 58: 2025-01-09T22:35:26.6451122Z <i> [webpack-dev-server] [HPM] Proxy rewrite rule created: "^/proxy" ~> ""
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 59: 2025-01-09T22:35:26.6451170Z <i> [webpack-dev-server] [HPM] Proxy created: /_explorer  -> http://localhost:8081
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 60: 2025-01-09T22:35:26.6451220Z <i> [webpack-dev-server] [HPM] Proxy created: /explorerProxy  -> http://localhost:8081
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 61: 2025-01-09T22:35:26.6451341Z <i> [webpack-dev-server] [HPM] Proxy rewrite rule created: "^/explorerProxy" ~> ""
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 62: 2025-01-09T22:35:26.6451396Z <i> [webpack-dev-server] [HPM] Proxy created: /72f988bf-86f1-41af-91ab-2d7cd011db47  -> https://login.microsoftonline.com/
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 63: 2025-01-09T22:35:26.6506599Z DocDBTrace Error: 0 : Exception Npgsql.NpgsqlException (0x80004005): Failed to connect to 127.0.0.1:9712
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 64: 2025-01-09T22:35:26.6506804Z  ---> System.Net.Sockets.SocketException (111): Connection refused
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 65: 2025-01-09T22:35:26.6506875Z    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 66: 2025-01-09T22:35:26.6506923Z    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 67: 2025-01-09T22:35:26.6506978Z    at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 68: 2025-01-09T22:35:26.6507043Z    at Npgsql.TaskTimeoutAndCancellation.ExecuteAsync(Func`2 getTaskFunc, NpgsqlTimeout timeout, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 69: 2025-01-09T22:35:26.6507094Z    at Npgsql.Internal.NpgsqlConnector.ConnectAsync(NpgsqlTimeout timeout, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 70: 2025-01-09T22:35:26.6507143Z    at Npgsql.Internal.NpgsqlConnector.ConnectAsync(NpgsqlTimeout timeout, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 71: 2025-01-09T22:35:26.6507189Z    at Npgsql.Internal.NpgsqlConnector.RawOpen(SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 72: 2025-01-09T22:35:26.6507240Z    at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|213_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 73: 2025-01-09T22:35:26.6507295Z    at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 74: 2025-01-09T22:35:26.6507342Z    at Npgsql.PoolingDataSource.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 75: 2025-01-09T22:35:26.6507392Z    at Npgsql.PoolingDataSource.<Get>g__RentAsync|34_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 76: 2025-01-09T22:35:26.6507446Z    at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|42_0(Boolean async, CancellationToken cancellationToken)
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 77: 2025-01-09T22:35:26.6507501Z    at Microsoft.Azure.Cosmos.Postgres.Core.Runtime.PostgresClient.GetConnectionAsync(NpgsqlDataSource dataSource, PostgresRequestOptions requestOptions, IPostgresOpenCursor openCursor) in /tmp/gateway/Cosmos.Postgres.Core/Runtime/PostgresClient.cs:line 522
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 78: 2025-01-09T22:35:26.6507558Z    at Microsoft.Azure.Cosmos.Postgres.Core.Runtime.PostgresClient.RunRequestWithRetriesAsync[TResponse,TState](PostgresRequestOptions requestOptions, ClientOptions clientOptions, Func`5 runFunc, TState state, CancellationToken cancellationToken, IPostgresOpenCursor openCursor) in /tmp/gateway/Cosmos.Postgres.Core/Runtime/PostgresClient.cs:line 562
[2025-01-09T22:35:26] Aspire.Hosting.Tests.Resources.cosmos Information: 79: 2025-01-09T22:35:26.6507793Z DocDBTrace Information: 0 : Retrying ex Failed to connect to 127.0.0.1:9712, retryCount: 9, retryDelayinMs: 1000 
[2025-01-09T22:35:27] Aspire.Hosting.Dcp.ApplicationExecutor Debug: Log streaming for cosmos-yaemxhyx-8f2b8cf was cancelled.

Have you ever seen this error before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Aspire.Microsoft.Azure.Cosmos] How to access the CosmosDB emulator data explorer?
4 participants