Skip to content

Diagnostics doc + simplified error code #15

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

Merged
merged 1 commit into from
Sep 11, 2024
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
11 changes: 11 additions & 0 deletions docs/diagnostics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# .NET Aspire Community Toolkit Diagnostics

Some of the API's in the .NET Aspire Community Toolkit are decorated with the [`ExperimentalAttrible`](https://learn.microsoft.com/dotnet/api/system.diagnostics.codeanalysis.experimentalattribute). This attribute is used to indicate that an API is not ready for production use and is subject to change in the future.

## CTASPIRE001

There are cases where there is an API provided by the .NET Aspire Community Toolkit that is an intermidiary solution until a feature is added to .NET Aspire itself. This could be a private API that is not yet ready for public consumption, or a workaround waiting for the completion of a feature in .NET Aspire.

In these cases, refer to the `<remarks>` docs section of the API for more information on the feature in .NET Aspire and the issue(s) to track.

Once a release of .NET Aspire with that API is available, the API in the .NET Aspire Community Toolkit will be marked as obsolete and will be removed in a future release.
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ nav:
- Hosting.Java: integrations/hosting-java.md
- Contributing: contributing.md
- Versioning and Releases: versioning.md
- Diagnostics: diagnostics.md

plugins:
- glightbox
Expand Down Expand Up @@ -53,3 +54,4 @@ markdown_extensions:
# - pymdownx.emoji:
# emoji_index: !!python/name:material.extensions.emoji.twemoji
# emoji_generator: !!python/name:material.extensions.emoji.to_svg

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps.Tests;

#pragma warning disable CTASPIRESRC001
#pragma warning disable CTASPIRE001
public class SwaHostingComponentTests(AspireIntegrationTestFixture<Projects.CommunityToolkit_Aspire_StaticWebApps_AppHost> fixture) : IClassFixture<AspireIntegrationTestFixture<Projects.CommunityToolkit_Aspire_StaticWebApps_AppHost>>
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace CommunityToolkit.Aspire.Java.Hosting.EndToEndTests;

#pragma warning disable CTASPIRESRC001
#pragma warning disable CTASPIRE001
public class JavaHostingComponentTests(AspireIntegrationTestFixture<Projects.CommunityToolkit_Aspire_Java_AppHost> fixture) : IClassFixture<AspireIntegrationTestFixture<Projects.CommunityToolkit_Aspire_Java_AppHost>>
{
[Theory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class LoggerNotificationExtensions
/// <remarks>
/// This has been copied from the Aspire.Hosting.Tests project and will likely be removed in the future.
/// </remarks>
[Experimental("CTASPIRESRC001", UrlFormat = "https://aka.ms/communitytoolkit/aspire/diagnostics#{0}")]
[Experimental("CTASPIRE001", UrlFormat = "https://aka.ms/communitytoolkit/aspire/diagnostics#{0}")]
public static Task WaitForTextAsync(this DistributedApplication app, string logText, string? resourceName = null, CancellationToken cancellationToken = default)
{
ArgumentNullException.ThrowIfNull(app);
Expand All @@ -41,7 +41,7 @@ public static Task WaitForTextAsync(this DistributedApplication app, string logT
/// <remarks>
/// This has been copied from the Aspire.Hosting.Tests project and will likely be removed in the future.
/// </remarks>
[Experimental("CTASPIRESRC001", UrlFormat = "https://aka.ms/communitytoolkit/aspire/diagnostics#{0}")]
[Experimental("CTASPIRE001", UrlFormat = "https://aka.ms/communitytoolkit/aspire/diagnostics#{0}")]
public static Task WaitForTextAsync(this DistributedApplication app, IEnumerable<string> logTexts, string? resourceName = null, CancellationToken cancellationToken = default)
{
ArgumentNullException.ThrowIfNull(app);
Expand All @@ -61,7 +61,7 @@ public static Task WaitForTextAsync(this DistributedApplication app, IEnumerable
/// <remarks>
/// This has been copied from the Aspire.Hosting.Tests project and will likely be removed in the future.
/// </remarks>
[Experimental("CTASPIRESRC001", UrlFormat = "https://aka.ms/communitytoolkit/aspire/diagnostics#{0}")]
[Experimental("CTASPIRE001", UrlFormat = "https://aka.ms/communitytoolkit/aspire/diagnostics#{0}")]
public static Task WaitForTextAsync(this DistributedApplication app, Predicate<string> predicate, string? resourceName = null, CancellationToken cancellationToken = default)
{
ArgumentNullException.ThrowIfNull(app);
Expand Down Expand Up @@ -89,7 +89,7 @@ public static Task WaitForTextAsync(this DistributedApplication app, Predicate<s
/// <remarks>
/// This has been copied from the Aspire.Hosting.Tests project and will likely be removed in the future.
/// </remarks>
[Experimental("CTASPIRESRC001", UrlFormat = "https://aka.ms/communitytoolkit/aspire/diagnostics#{0}")]
[Experimental("CTASPIRE001", UrlFormat = "https://aka.ms/communitytoolkit/aspire/diagnostics#{0}")]
public static async Task WaitForAllTextAsync(this DistributedApplication app, IEnumerable<string> logTexts, string? resourceName = null, CancellationToken cancellationToken = default)
{
var table = logTexts.ToList();
Expand Down