Skip to content

Commit c01acb7

Browse files
Copilotcaptainsafia
andcommitted
Add XML documentation and update diagnostic ID to ASPIREPIPELINES004
- Update Experimental attribute from ASPIREPIPELINES001 to ASPIREPIPELINES004 - Add XML documentation for GetOutputDirectory() default behavior - Add XML documentation for private fields in PipelineOutputService - Document purpose of AppHost:PathSha256 usage in CreateTempDirectory - Suppress ASPIREPIPELINES004 diagnostic in all consuming files Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
1 parent 95f604b commit c01acb7

File tree

6 files changed

+20
-2
lines changed

6 files changed

+20
-2
lines changed

src/Aspire.Hosting.Azure/AzureEnvironmentResource.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#pragma warning disable ASPIREAZURE001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
55
#pragma warning disable ASPIREPIPELINES003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
66
#pragma warning disable ASPIREINTERACTION001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
7+
#pragma warning disable ASPIREPIPELINES004 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
78

89
using System.Diagnostics.CodeAnalysis;
910
using Aspire.Hosting.ApplicationModel;

src/Aspire.Hosting/DistributedApplicationBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#pragma warning disable ASPIREPIPELINES003
55
#pragma warning disable ASPIREPIPELINES001
66
#pragma warning disable ASPIREPIPELINES002
7+
#pragma warning disable ASPIREPIPELINES004
78

89
using System.Diagnostics;
910
using System.Reflection;

src/Aspire.Hosting/Pipelines/IPipelineOutputService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ namespace Aspire.Hosting.Pipelines;
99
/// <summary>
1010
/// Service for managing pipeline output directories.
1111
/// </summary>
12-
[Experimental("ASPIREPIPELINES001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
12+
[Experimental("ASPIREPIPELINES004", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
1313
public interface IPipelineOutputService
1414
{
1515
/// <summary>
1616
/// Gets the output directory for deployment artifacts.
17+
/// If no output path is configured, defaults to <c>{CurrentDirectory}/aspire-output</c>.
1718
/// </summary>
1819
/// <returns>The path to the output directory for deployment artifacts.</returns>
1920
string GetOutputDirectory();

src/Aspire.Hosting/Pipelines/PipelineOutputService.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ namespace Aspire.Hosting.Pipelines;
1111
/// <summary>
1212
/// Default implementation of <see cref="IPipelineOutputService"/>.
1313
/// </summary>
14-
[Experimental("ASPIREPIPELINES001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
14+
[Experimental("ASPIREPIPELINES004", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
1515
internal sealed class PipelineOutputService : IPipelineOutputService
1616
{
17+
/// <summary>
18+
/// Stores the resolved output directory path, or <c>null</c> if not specified.
19+
/// </summary>
1720
private readonly string? _outputPath;
21+
22+
/// <summary>
23+
/// Lazily creates and stores the path to the temporary directory for pipeline output.
24+
/// </summary>
1825
private readonly Lazy<string> _tempDirectory;
1926

2027
public PipelineOutputService(IOptions<PipelineOptions> options, IConfiguration configuration)
@@ -53,6 +60,12 @@ public string GetTempDirectory(IResource resource)
5360
return Path.Combine(baseTempDir, resource.Name);
5461
}
5562

63+
/// <summary>
64+
/// Creates a temporary directory for pipeline build artifacts.
65+
/// Uses AppHost:PathSha256 from configuration to create an isolated temp directory per app host,
66+
/// enabling multiple app hosts to run concurrently without conflicts.
67+
/// If AppHost:PathSha256 is not available, falls back to a generic "aspire" temp directory.
68+
/// </summary>
5669
private static string CreateTempDirectory(IConfiguration configuration)
5770
{
5871
var appHostSha = configuration["AppHost:PathSha256"];

src/Shared/PublishingContextUtils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
#pragma warning disable ASPIREPIPELINES001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
5+
#pragma warning disable ASPIREPIPELINES004 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
56

67
using Aspire.Hosting.ApplicationModel;
78
using Aspire.Hosting.Pipelines;

tests/Aspire.Hosting.Tests/Helpers/JsonDocumentManifestPublisher.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#pragma warning disable CS0618 // Type or member is obsolete
55
#pragma warning disable ASPIREPIPELINES001
6+
#pragma warning disable ASPIREPIPELINES004
67

78
using System.Text.Json;
89
using Aspire.Hosting.Publishing;

0 commit comments

Comments
 (0)