Skip to content

Commit

Permalink
Makes VolumeNameGenerator public (#6531)
Browse files Browse the repository at this point in the history
* -Makes VolumeNameGenerator public

* Update src/Aspire.Hosting/Utils/VolumeNameGenerator.cs

Co-authored-by: Dan Moseley <danmose@microsoft.com>

* Take @danmosely suggestion to change the exception message

* Renames VolumeNameGenerator.CreateVolumeName to Generate

* -Mark VolumeNameGenerator.Sanitize as internal

* Pretty sure that should be all of it

* Oops

* Update src/Aspire.Hosting/Utils/VolumeNameGenerator.cs

Co-authored-by: Damian Edwards <damian@damianedwards.com>

* Drops code doc of Sanitize since it's not public

---------

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Damian Edwards <damian@damianedwards.com>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent b76abf5 commit 51e9a0d
Show file tree
Hide file tree
Showing 66 changed files with 56 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<ItemGroup>
<Compile Include="..\Shared\Cosmos\CosmosConstants.cs" Link="Shared\CosmosConstants.cs" />
<Compile Include="..\Shared\Cosmos\CosmosUtils.cs" Link="Shared\CosmosUtils.cs" />
<Compile Include="..\Shared\VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static CosmosClient CreateCosmosClient(string connectionString)
/// <returns>A builder for the <see cref="AzureCosmosDBEmulatorResource"/>.</returns>
public static IResourceBuilder<AzureCosmosDBEmulatorResource> WithDataVolume(this IResourceBuilder<AzureCosmosDBEmulatorResource> builder, string? name = null)
=> builder.WithEnvironment("AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE", "true")
.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/tmp/cosmos/appdata", isReadOnly: false);
.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/tmp/cosmos/appdata", isReadOnly: false);

/// <summary>
/// Configures the gateway port for the Azure Cosmos DB emulator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
<MinCodeCoverage>14</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Aspire.Hosting.Azure.Storage\Aspire.Hosting.Azure.Storage.csproj" />
<ProjectReference Include="..\Aspire.Hosting.Azure\Aspire.Hosting.Azure.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public static IResourceBuilder<AzureEventHubsEmulatorResource> WithDataBindMount
/// <param name="name">The name of the volume. Defaults to an auto-generated name based on the application and resource names.</param>
/// <returns>A builder for the <see cref="AzureEventHubsEmulatorResource"/>.</returns>
public static IResourceBuilder<AzureEventHubsEmulatorResource> WithDataVolume(this IResourceBuilder<AzureEventHubsEmulatorResource> builder, string? name = null)
=> builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/data", isReadOnly: false);
=> builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/data", isReadOnly: false);

/// <summary>
/// Configures the gateway port for the Azure Event Hubs emulator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
<PropertyGroup>
<MinCodeCoverage>96</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>


<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Azure.Storage.Blobs" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static IResourceBuilder<AzureStorageEmulatorResource> WithDataBindMount(t
/// <param name="isReadOnly">A flag that indicates if this is a read-only volume.</param>
/// <returns>A builder for the <see cref="AzureStorageEmulatorResource"/>.</returns>
public static IResourceBuilder<AzureStorageEmulatorResource> WithDataVolume(this IResourceBuilder<AzureStorageEmulatorResource> builder, string? name = null, bool isReadOnly = false)
=> builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/data", isReadOnly);
=> builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/data", isReadOnly);

/// <summary>
/// Modifies the host port that the storage emulator listens on for blob requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
<Compile Include="$(ComponentsDir)Aspire.Elastic.Clients.Elasticsearch\ElasticsearchHealthCheck.cs" Link="ElasticsearchHealthCheck.cs"></Compile>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public static IResourceBuilder<ElasticsearchResource> WithDataVolume(this IResou
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/usr/share/elasticsearch/data");
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/usr/share/elasticsearch/data");
}

/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Aspire.Hosting.Garnet/Aspire.Hosting.Garnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
<MinCodeCoverage>92</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Redis" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static IResourceBuilder<GarnetResource> WithDataVolume(this IResourceBuil
{
ArgumentNullException.ThrowIfNull(builder);

builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), GarnetContainerDataDirectory,
builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), GarnetContainerDataDirectory,
isReadOnly);
if (!isReadOnly)
{
Expand Down
6 changes: 0 additions & 6 deletions src/Aspire.Hosting.Kafka/Aspire.Hosting.Kafka.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
<MinCodeCoverage>25</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>
<ItemGroup>
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Kafka" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Kafka/KafkaBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public static IResourceBuilder<KafkaServerResource> WithDataVolume(this IResourc

return builder
.WithEnvironment(ConfigureLogDirs)
.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), Target, isReadOnly);
.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), Target, isReadOnly);
}

/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Aspire.Hosting.Keycloak/Aspire.Hosting.Keycloak.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
<MinCodeCoverage>80</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Aspire.Hosting\Aspire.Hosting.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static IResourceBuilder<KeycloakResource> WithDataVolume(this IResourceBu
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/opt/keycloak/data",
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/opt/keycloak/data",
false);
}

Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Hosting.Milvus/Aspire.Hosting.Milvus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

<ItemGroup>
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Milvus/MilvusBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static IResourceBuilder<T> WithAttu<T>(this IResourceBuilder<T> builder,
public static IResourceBuilder<MilvusServerResource> WithDataVolume(this IResourceBuilder<MilvusServerResource> builder, string? name = null, bool isReadOnly = false)
{
ArgumentNullException.ThrowIfNull(builder);
return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/var/lib/milvus", isReadOnly);
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/var/lib/milvus", isReadOnly);
}

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Hosting.MongoDB/Aspire.Hosting.MongoDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

<ItemGroup>
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.MongoDB/MongoDBBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static IResourceBuilder<MongoDBServerResource> WithDataVolume(this IResou
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/data/db", isReadOnly);
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/data/db", isReadOnly);
}

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Hosting.MySql/Aspire.Hosting.MySql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

<ItemGroup>
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.MySql/MySqlBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public static IResourceBuilder<MySqlServerResource> WithDataVolume(this IResourc
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/var/lib/mysql", isReadOnly);
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/var/lib/mysql", isReadOnly);
}

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Hosting.Nats/Aspire.Hosting.Nats.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
<Compile Include="$(ComponentsDir)Aspire.NATS.Net\NatsHealthCheck.cs" Link="NatsHealthCheck"></Compile>
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Nats/NatsBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static IResourceBuilder<NatsServerResource> WithDataVolume(this IResource
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/var/lib/nats",
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/var/lib/nats",
isReadOnly)
.WithArgs("-sd", "/var/lib/nats");
}
Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Hosting.Oracle/Aspire.Hosting.Oracle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<ItemGroup>
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static IResourceBuilder<OracleDatabaseResource> AddDatabase(this IResourc
/// <param name="name">The name of the volume. Defaults to an auto-generated name based on the application and resource names.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
public static IResourceBuilder<OracleDatabaseServerResource> WithDataVolume(this IResourceBuilder<OracleDatabaseServerResource> builder, string? name = null)
=> builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/opt/oracle/oradata", false);
=> builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/opt/oracle/oradata", false);

/// <summary>
/// Adds a bind mount for the data folder to a Oracle Database server container resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

<ItemGroup>
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public static IResourceBuilder<PostgresServerResource> WithDataVolume(this IReso
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"),
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"),
"/var/lib/postgresql/data", isReadOnly);
}

Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Hosting.Qdrant/Aspire.Hosting.Qdrant.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

<ItemGroup>
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
<Compile Include="$(ComponentsDir)Aspire.Qdrant.Client\QdrantHealthCheck.cs" Link="QdrantHealthCheck.cs"></Compile>
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Qdrant/QdrantBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static IResourceBuilder<QdrantServerResource> WithDataVolume(this IResour
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/qdrant/storage",
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/qdrant/storage",
isReadOnly);
}

Expand Down
4 changes: 0 additions & 4 deletions src/Aspire.Hosting.RabbitMQ/Aspire.Hosting.RabbitMQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
<MinCodeCoverage>59</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.RabbitMQ/RabbitMQBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static IResourceBuilder<RabbitMQServerResource> WithDataVolume(this IReso
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/var/lib/rabbitmq", isReadOnly)
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/var/lib/rabbitmq", isReadOnly)
.RunWithStableNodeName();
}

Expand Down
4 changes: 0 additions & 4 deletions src/Aspire.Hosting.Redis/Aspire.Hosting.Redis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
<MinCodeCoverage>90</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Redis" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Redis/RedisBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public static IResourceBuilder<RedisResource> WithDataVolume(this IResourceBuild
{
ArgumentNullException.ThrowIfNull(builder);

builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/data", isReadOnly);
builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/data", isReadOnly);
if (!isReadOnly)
{
builder.WithPersistence();
Expand Down
4 changes: 0 additions & 4 deletions src/Aspire.Hosting.Seq/Aspire.Hosting.Seq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
<MinCodeCoverage>100</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Aspire.Hosting\Aspire.Hosting.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Seq/SeqBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static IResourceBuilder<SeqResource> AddSeq(
/// <param name="isReadOnly">A flag that indicates if this is a read-only volume.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
public static IResourceBuilder<SeqResource> WithDataVolume(this IResourceBuilder<SeqResource> builder, string? name = null, bool isReadOnly = false)
=> builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), SeqContainerDataDirectory, isReadOnly);
=> builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), SeqContainerDataDirectory, isReadOnly);

/// <summary>
/// Adds a bind mount for the data folder to a Seq container resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

<ItemGroup>
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.SqlServer/SqlServerBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static IResourceBuilder<SqlServerServerResource> WithDataVolume(this IRes
{
ArgumentNullException.ThrowIfNull(builder);

return builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), "/var/opt/mssql", isReadOnly);
return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/var/opt/mssql", isReadOnly);
}

/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Aspire.Hosting.Valkey/Aspire.Hosting.Valkey.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
<MinCodeCoverage>92</MinCodeCoverage>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Redis" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Valkey/ValkeyBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static IResourceBuilder<ValkeyResource> AddValkey(this IDistributedApplic
public static IResourceBuilder<ValkeyResource> WithDataVolume(this IResourceBuilder<ValkeyResource> builder,
string? name = null, bool isReadOnly = false)
{
builder.WithVolume(name ?? VolumeNameGenerator.CreateVolumeName(builder, "data"), ValkeyContainerDataDirectory,
builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), ValkeyContainerDataDirectory,
isReadOnly);
if (!isReadOnly)
{
Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Hosting/Aspire.Hosting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<Compile Include="$(SharedDir)PathNormalizer.cs" Link="Utils\PathNormalizer.cs" />
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)TaskHelpers.cs" Link="Utils\TaskHelpers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
<Compile Include="$(SharedDir)DashboardConfigNames.cs" Link="Utils\DashboardConfigNames.cs" />
<Compile Include="$(SharedDir)TokenGenerator.cs" Link="Utils\TokenGenerator.cs" />
<Compile Include="$(SharedDir)LoggingHelpers.cs" Link="Utils\LoggingHelpers.cs" />
Expand Down
2 changes: 2 additions & 0 deletions src/Aspire.Hosting/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ Aspire.Hosting.LaunchSettings
Aspire.Hosting.LaunchSettings.LaunchSettings() -> void
Aspire.Hosting.LaunchSettings.Profiles.get -> System.Collections.Generic.Dictionary<string!, Aspire.Hosting.LaunchProfile!>!
Aspire.Hosting.LaunchSettings.Profiles.set -> void
Aspire.Hosting.Utils.VolumeNameGenerator
static Aspire.Hosting.ApplicationModel.CommandResults.Success() -> Aspire.Hosting.ApplicationModel.ExecuteCommandResult!
static Aspire.Hosting.ApplicationModel.ResourceExtensions.GetEnvironmentVariableValuesAsync(this Aspire.Hosting.ApplicationModel.IResourceWithEnvironment! resource, Aspire.Hosting.DistributedApplicationOperation applicationOperation = Aspire.Hosting.DistributedApplicationOperation.Run) -> System.Threading.Tasks.ValueTask<System.Collections.Generic.Dictionary<string!, string!>!>
Aspire.Hosting.ApplicationModel.ResourceNotificationService.WaitForResourceAsync(string! resourceName, string? targetState = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!
Expand Down Expand Up @@ -238,6 +239,7 @@ static Aspire.Hosting.ResourceBuilderExtensions.WithCommand<T>(this Aspire.Hosti
static Aspire.Hosting.ResourceBuilderExtensions.WithHealthCheck<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T>! builder, string! key) -> Aspire.Hosting.ApplicationModel.IResourceBuilder<T>!
static Aspire.Hosting.ResourceBuilderExtensions.WithHttpHealthCheck<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T>! builder, string? path = null, int? statusCode = null, string? endpointName = null) -> Aspire.Hosting.ApplicationModel.IResourceBuilder<T>!
static Aspire.Hosting.ResourceBuilderExtensions.WithHttpsHealthCheck<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T>! builder, string? path = null, int? statusCode = null, string? endpointName = null) -> Aspire.Hosting.ApplicationModel.IResourceBuilder<T>!
static Aspire.Hosting.Utils.VolumeNameGenerator.Generate<T>(Aspire.Hosting.ApplicationModel.IResourceBuilder<T>! builder, string! suffix) -> string!
static readonly Aspire.Hosting.ApplicationModel.KnownResourceStates.Exited -> string!
static readonly Aspire.Hosting.ApplicationModel.KnownResourceStates.FailedToStart -> string!
static readonly Aspire.Hosting.ApplicationModel.KnownResourceStates.Finished -> string!
Expand Down
Loading

0 comments on commit 51e9a0d

Please sign in to comment.