Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions src/Aspire.Hosting.Azure/AzureBicepResourceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,6 @@ public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> bu
return builder.WithEnvironment(name, (IExpressionValue)bicepOutputReference);
}

// Keep these ATS-only aliases for backward compatibility with existing polyglot app hosts.
// Remove them once callers have migrated to the unified withEnvironment(...) export.
// Tracking issue: https://github.com/microsoft/aspire/issues/15734
/// <summary>
/// Obsolete ATS alias for <see cref="WithEnvironment{T}(IResourceBuilder{T}, string, BicepOutputReference)"/>.
/// </summary>
/// <typeparam name="T">The resource type.</typeparam>
/// <param name="builder">The resource builder.</param>
/// <param name="name">The name of the environment variable.</param>
/// <param name="bicepOutputReference">The reference to the Bicep output.</param>
/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
[Obsolete("ATS compatibility shim. Use withEnvironment instead.")]
[AspireExport("withEnvironmentFromOutput", Description = "Sets an environment variable from a Bicep output reference")]
internal static IResourceBuilder<T> WithEnvironmentFromOutputShim<T>(this IResourceBuilder<T> builder, string name, BicepOutputReference bicepOutputReference)
where T : IResourceWithEnvironment
{
return builder.WithEnvironment(name, bicepOutputReference);
}

/// <summary>
/// Adds an environment variable to the resource with the value of the secret output from the bicep template.
/// </summary>
Expand Down Expand Up @@ -137,22 +118,6 @@ public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> bu
return builder.WithEnvironment(name, (IExpressionValue)secretReference);
}

/// <summary>
/// Obsolete ATS alias for <see cref="WithEnvironment{T}(IResourceBuilder{T}, string, IAzureKeyVaultSecretReference)"/>.
/// </summary>
/// <typeparam name="T">The resource type.</typeparam>
/// <param name="builder">The resource builder.</param>
/// <param name="name">The name of the environment variable.</param>
/// <param name="secretReference">The key vault secret reference.</param>
/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns>
[Obsolete("ATS compatibility shim. Use withEnvironment instead.")]
[AspireExport("withEnvironmentFromKeyVaultSecret", Description = "Sets an environment variable from an Azure Key Vault secret reference")]
internal static IResourceBuilder<T> WithEnvironmentFromKeyVaultSecretShim<T>(this IResourceBuilder<T> builder, string name, IAzureKeyVaultSecretReference secretReference)
where T : IResourceWithEnvironment
{
return builder.WithEnvironment(name, secretReference);
}

/// <summary>
/// Adds a parameter to the bicep template.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,6 @@ Aspire.Hosting/withEndpointProxySupport(proxyEnabled: boolean) -> Aspire.Hosting
Aspire.Hosting/withEntrypoint(entrypoint: string) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.ContainerResource
Aspire.Hosting/withEnvironment(name: string, value: string|Aspire.Hosting/Aspire.Hosting.ApplicationModel.ReferenceExpression|Aspire.Hosting/Aspire.Hosting.ApplicationModel.EndpointReference|Aspire.Hosting/Aspire.Hosting.ApplicationModel.ParameterResource|Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithConnectionString|Aspire.Hosting/Aspire.Hosting.ApplicationModel.IExpressionValue) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentCallback(callback: callback) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentConnectionString(envVarName: string, resource: Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithConnectionString) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentEndpoint(name: string, endpointReference: Aspire.Hosting/Aspire.Hosting.ApplicationModel.EndpointReference) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentExpression(name: string, value: Aspire.Hosting/Aspire.Hosting.ApplicationModel.ReferenceExpression) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentParameter(name: string, parameter: Aspire.Hosting/Aspire.Hosting.ApplicationModel.ParameterResource) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withExecutableCommand(command: string) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.ExecutableResource
Aspire.Hosting/withExplicitStart() -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResource
Aspire.Hosting/withExternalHttpEndpoints() -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,6 @@ internal static YarpRoute AddRoute(
return AddRouteCore(builder, path, target);
}

/// <summary>
/// Adds a route for an existing cluster.
/// </summary>
/// <param name="builder">The builder instance.</param>
/// <param name="path">The path to match for this route.</param>
/// <param name="cluster">The target cluster for this route.</param>
/// <returns>The created route.</returns>
[Obsolete("Use addRoute(path, target) instead.")]
[AspireExport("IYarpConfigurationBuilder.addRoute", MethodName = "addRouteCluster", Description = "Obsolete compatibility shim for the previous cluster-only addRoute export. Use addRoute(path, target) instead.")]
internal static YarpRoute AddRouteCluster(this IYarpConfigurationBuilder builder, string path, YarpCluster cluster)
{
return builder.AddRoute(path, cluster);
}

/// <summary>
/// Add a new catch all route to YARP that will target the cluster in parameter.
/// </summary>
Expand Down
70 changes: 0 additions & 70 deletions src/Aspire.Hosting/ResourceBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,25 +141,6 @@ public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> bu
});
}

// Keep these ATS-only aliases for backward compatibility with existing polyglot app hosts.
// Remove them once callers have migrated to the unified withEnvironment(...) export.
// Tracking issue: https://github.com/microsoft/aspire/issues/15734
/// <summary>
/// Obsolete ATS alias for <see cref="WithEnvironment{T}(IResourceBuilder{T}, string, ReferenceExpression)"/>.
/// </summary>
/// <typeparam name="T">The resource type.</typeparam>
/// <param name="builder">The resource builder.</param>
/// <param name="name">The name of the environment variable.</param>
/// <param name="value">The reference expression value.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
[Obsolete("ATS compatibility shim. Use withEnvironment instead.")]
[AspireExport("withEnvironmentExpression", Description = "Sets an environment variable from a reference expression")]
internal static IResourceBuilder<T> WithEnvironmentExpressionShim<T>(this IResourceBuilder<T> builder, string name, ReferenceExpression value)
where T : IResourceWithEnvironment
{
return builder.WithEnvironment(name, value);
}

/// <summary>
/// Adds an environment variable to the resource.
/// </summary>
Expand Down Expand Up @@ -235,22 +216,6 @@ public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> bu
});
}

/// <summary>
/// Obsolete ATS alias for <see cref="WithEnvironment{T}(IResourceBuilder{T}, string, EndpointReference)"/>.
/// </summary>
/// <typeparam name="T">The resource type.</typeparam>
/// <param name="builder">The resource builder.</param>
/// <param name="name">The name of the environment variable.</param>
/// <param name="endpointReference">The endpoint reference value.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
[Obsolete("ATS compatibility shim. Use withEnvironment instead.")]
[AspireExport("withEnvironmentEndpoint", Description = "Sets an environment variable from an endpoint reference")]
internal static IResourceBuilder<T> WithEnvironmentEndpointShim<T>(this IResourceBuilder<T> builder, string name, EndpointReference endpointReference)
where T : IResourceWithEnvironment
{
return builder.WithEnvironment(name, endpointReference);
}

/// <summary>
/// Adds an environment variable to the resource with the URL from the <see cref="ExternalServiceResource"/>.
/// </summary>
Expand Down Expand Up @@ -317,22 +282,6 @@ public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> bu
});
}

/// <summary>
/// Obsolete ATS alias for <see cref="WithEnvironment{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/>.
/// </summary>
/// <typeparam name="T">The resource type.</typeparam>
/// <param name="builder">The resource builder.</param>
/// <param name="name">The name of the environment variable.</param>
/// <param name="parameter">The parameter resource builder.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
[Obsolete("ATS compatibility shim. Use withEnvironment instead.")]
[AspireExport("withEnvironmentParameter", Description = "Sets an environment variable from a parameter resource")]
internal static IResourceBuilder<T> WithEnvironmentParameterShim<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> parameter)
where T : IResourceWithEnvironment
{
return builder.WithEnvironment(name, parameter);
}

/// <summary>
/// Adds an environment variable to the resource with the connection string from the referenced resource.
/// </summary>
Expand Down Expand Up @@ -360,25 +309,6 @@ public static IResourceBuilder<T> WithEnvironment<T>(
});
}

/// <summary>
/// Obsolete ATS alias for <see cref="WithEnvironment{T}(IResourceBuilder{T}, string, IResourceBuilder{IResourceWithConnectionString})"/>.
/// </summary>
/// <typeparam name="T">The destination resource type.</typeparam>
/// <param name="builder">The destination resource builder.</param>
/// <param name="envVarName">The name of the environment variable.</param>
/// <param name="resource">The referenced connection string resource builder.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
[Obsolete("ATS compatibility shim. Use withEnvironment instead.")]
[AspireExport("withEnvironmentConnectionString", Description = "Sets an environment variable from a connection string resource")]
internal static IResourceBuilder<T> WithEnvironmentConnectionStringShim<T>(
this IResourceBuilder<T> builder,
string envVarName,
IResourceBuilder<IResourceWithConnectionString> resource)
where T : IResourceWithEnvironment
{
return builder.WithEnvironment(envVarName, resource);
}

/// <summary>
/// Adds an environment variable to the resource with a value that provides both a runtime value and a manifest expression.
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Aspire.Hosting/api/Aspire.Hosting.Capabilities.txt
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@ Aspire.Hosting/withEndpointProxySupport(proxyEnabled: boolean) -> Aspire.Hosting
Aspire.Hosting/withEntrypoint(entrypoint: string) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.ContainerResource
Aspire.Hosting/withEnvironment(name: string, value: string|Aspire.Hosting/Aspire.Hosting.ApplicationModel.ReferenceExpression|Aspire.Hosting/Aspire.Hosting.ApplicationModel.EndpointReference|Aspire.Hosting/Aspire.Hosting.ApplicationModel.ParameterResource|Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithConnectionString|Aspire.Hosting/Aspire.Hosting.ApplicationModel.IExpressionValue) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentCallback(callback: callback) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Comment thread
sebastienros marked this conversation as resolved.
Aspire.Hosting/withEnvironmentConnectionString(envVarName: string, resource: Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithConnectionString) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentEndpoint(name: string, endpointReference: Aspire.Hosting/Aspire.Hosting.ApplicationModel.EndpointReference) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentExpression(name: string, value: Aspire.Hosting/Aspire.Hosting.ApplicationModel.ReferenceExpression) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withEnvironmentParameter(name: string, parameter: Aspire.Hosting/Aspire.Hosting.ApplicationModel.ParameterResource) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
Aspire.Hosting/withExecutableCommand(command: string) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.ExecutableResource
Aspire.Hosting/withExplicitStart() -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResource
Aspire.Hosting/withExternalHttpEndpoints() -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints
Expand Down
Loading
Loading