Skip to content

Conversation

@danegsta
Copy link
Member

@danegsta danegsta commented Nov 4, 2025

Description

Marks the new IDeveloperCertificateService API as experimental in case we need to make some tweaks to it as we update our developer certificate support.

@danegsta danegsta requested a review from mitchdenny as a code owner November 4, 2025 01:34
Copilot AI review requested due to automatic review settings November 4, 2025 01:34
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12648

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12648"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR marks the IDeveloperCertificateService interface as experimental by adding the [Experimental] attribute with diagnostic ID ASPIRECERTIFICATES001. To address resulting compiler warnings, #pragma warning disable/restore directives are added throughout the codebase wherever this interface is referenced or implemented.

Key Changes:

  • Added [Experimental] attribute to IDeveloperCertificateService interface
  • Suppressed ASPIRECERTIFICATES001 warnings in all files that reference or implement this interface
  • Added using System.Diagnostics.CodeAnalysis; to support the Experimental attribute

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Aspire.Hosting/IDeveloperCertificateService.cs Added Experimental attribute and CodeAnalysis using directive
src/Aspire.Hosting/DeveloperCertificateService.cs Suppressed warning on class implementing the experimental interface
src/Aspire.Hosting/DistributedApplicationBuilder.cs Suppressed warning where service is registered in DI container
src/Aspire.Hosting/Dcp/DcpExecutor.cs Suppressed warnings on field declaration and constructor parameter
src/Aspire.Hosting/ApplicationModel/ResourceExtensions.cs Suppressed warning where service is retrieved from DI
src/Aspire.Hosting.Yarp/YarpResourceExtensions.cs Suppressed warning where service is retrieved from DI
tests/Aspire.Hosting.Tests/Utils/TestDeveloperCertificateService.cs Suppressed warning on test implementation class
tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs Suppressed warning where service is retrieved in test
tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs Suppressed warning around DcpExecutor constructor call in test
tests/Aspire.Hosting.Yarp.Tests/AddYarpTests.cs Suppressed warnings in multiple test methods that create builders using the experimental service

[InlineData(false)]
public async Task VerifyRunEnvVariablesAreSet(bool containerCertificateSupport)
{
#pragma warning disable ASPIRECERTIFICATES001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pragma warning disable could be placed at the file scope (after the using statements) rather than within individual test methods. This would reduce repetition across 5 test methods and make the code more maintainable. The experimental nature of IDeveloperCertificateService applies to the entire test file.

Copilot uses AI. Check for mistakes.
Comment on lines +73 to +75
#pragma warning disable ASPIRECERTIFICATES001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
private readonly IDeveloperCertificateService _developerCertificateService;
#pragma warning restore ASPIRECERTIFICATES001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field declaration and constructor parameter both suppress the same warning. Consider placing the pragma at file scope to avoid duplicating the suppression for both the field (lines 73-75) and constructor parameter (lines 110-112).

Copilot uses AI. Check for mistakes.
@danegsta danegsta merged commit 6b10b6d into dotnet:main Nov 4, 2025
302 of 303 checks passed
@danegsta
Copy link
Member Author

danegsta commented Nov 4, 2025

/backport to release/13.0

@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Nov 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19056239122

@eerhardt
Copy link
Member

eerhardt commented Nov 4, 2025

@danegsta - can you open a new docs issue for this new diagnostic - New diagnostic template

@danegsta
Copy link
Member Author

danegsta commented Nov 4, 2025

@danegsta - can you open a new docs issue for this new diagnostic - New diagnostic template

Done: dotnet/docs-aspire#5449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants