Skip to content

WithRedisInsight and ContainerLifetime.Persistent causes multiple instances to show up #6111

@eerhardt

Description

@eerhardt

If I have the following:

var builder = DistributedApplication.CreateBuilder(args);

var redis = builder.AddRedis("redis")
    .WithDataVolume()
    .WithRedisInsight(c => c.WithLifetime(ContainerLifetime.Persistent));

builder.AddProject<Projects.Redis_ApiService>("apiservice")
    .WithReference(redis).WaitFor(redis);

builder.Build().Run();

When I run multiple times, the RedisInights container stays running, but each time I run a new Redis instance shows up in it:

image

We should fix this so the same redis instance isn't added on re-run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-integrationsIssues pertaining to Aspire Integrations packagesredisIssues related to redis integrations

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions