Skip to content

[Automated] Update API Surface Area (release/17.0) - #22185

Merged
Jose Perez Rodriguez (joperezr) merged 1 commit into
release/17.0from
update-api-diffs-release/17.0
Nov 18, 2026
Merged

Jose Perez Rodriguez (joperezr) merged 1 commit into
release/17.0from
update-api-diffs-release/17.0

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Auto-generated update to the API surface to compare current surface vs latest release. This should only be merged once this surface area ships in a new release.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22185

Or

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

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Nov 11, 2026

@eerhardt Eric Erhardt (eerhardt) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

API review findings — see inline comments for details.

@eerhardt

Copy link
Copy Markdown
Member

API Review Summary

2 errors, 10 warnings, 4 info across 9 files.

Top areas of concern:

  • Breaking changes in stable packages: the Aspire.Microsoft.Azure.Cosmos configureClientOptions signature, the Docker UpdateConfig.MaxFailureRatio type, and ResourceUrlAnnotation.DisplayOrder (field → property).
  • AddProject obsoletion experience: no DiagnosticId/UrlFormat (only CS0618 suppression), and no generic AddDotnetProject<T>.
  • Parameter API design: the ParameterResource.SetValueAsync null default and its name overlap with ParameterProcessor.SetValueAsync, bool parameters, and the duplicate WithOptional/WithRequired/Required.
  • Experimental hygiene: resource traits aren't [Experimental], and ASPIREAZURE003 is reused for non-networking APIs.
  • Stable graduation: AksNodePoolConfig is a positional record.

Promotions to confirm ([Experimental] removed since 13.6.5): ASPIREPIPELINES001/002/004, ASPIREFILESYSTEM001, ASPIREUSERSECRETS001, ASPIREDOCKERFILEBUILDER001, ASPIREPROBES001, ASPIREAZURE001, ASPIREACANAMING001/002, ASPIREDOTNETPROJECT001, and ASPIRECOSMOSDB001. For ASPIRECOSMOSDB001, WithDataExplorer was promoted, while RunAsPreviewEmulator became [Obsolete("Use RunAsEmulator instead.")] rather than being removed or kept Experimental. Without Experimental, it is now a stable commitment until the next major version.

Each finding is posted as a separate inline comment for discussion.

@aspire-repo-bot
aspire-repo-bot Bot force-pushed the update-api-diffs-release/17.0 branch from 0498023 to 3c99d22 Compare November 12, 2026 16:26
Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Nov 13, 2026
## Description

Addresses the API review feedback in
#22185 (comment):
resource traits are a new concept on stable `Aspire.Hosting` in 17.0,
trait names are free-form strings, and the reserved names that get
special handling (such as the tag trait) are still internal. This marks
the trait APIs experimental so the shape can still change once
well-known traits are designed.

New diagnostic: `ASPIRERESOURCETRAITS001` (docs link
`https://aka.ms/aspire/diagnostics/ASPIRERESOURCETRAITS001`).

Marked `[Experimental]`:

- `ResourceTraitBuilderExtensions.WithTrait`
- `ResourceTraitBuilderExtensions.WithTags`, including the internal
`withTags` polyglot adapter
- `ResourceTraitBuilderExtensions.WithDisplayOrder` (this replaced
`WithDashboardPosition` in release/17.0)
- `TraitAnnotation`
- `DisplayOrderAnnotation`

The attribute is applied to each member, not to the extension class.
`[Experimental]` on a type is only reported where the type name appears,
and extension-method calls such as `builder.WithTags(...)` never name
the containing class, so a class-level attribute would not warn C#
callers.

Other changes:

- The generated TypeScript and Go SDKs now mark `withTrait`, `withTags`
and `withDisplayOrder` as experimental, so their snapshots were updated.
- `docs/list-of-diagnostics.md` lists the new ID.
- The internal snapshot code, `Aspire.Hosting.Tests` and the TestShop
playground suppress the new diagnostic.

Making `ResourceTypeDisplayNameAnnotation` internal, the other API
review comment, is handled separately in
#22205.

Follow-up: add the aka.ms redirect and an aspire.dev diagnostics page
for `ASPIRERESOURCETRAITS001`.

## Validation

- `Aspire.Hosting.Tests`: `ResourceTraitBuilderTests`,
`ResourceNotificationTests`, `DashboardServiceDataTerminalTests` pass.
- `Aspire.Hosting.CodeGeneration.{TypeScript,Go,Java,Python,Rust}.Tests`
pass.
- `Aspire.Dashboard.Tests`, `Aspire.Cli.Tests` and `TestShop.AppHost`
build.

---------

Co-authored-by: Sébastien Ros <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Nov 13, 2026
## Description

Addresses API review feedback on the 17.0 API surface from #22185, so
the new APIs ship with their final shape in 17.0.

Changes:

- **Legacy `AddProject` overloads**
([r4552196643](#22185 (comment))):
the `[Obsolete]` messages are clearer and point users to the replacement
API.
- **Parameter optionality**
([r4552196666](#22185 (comment))):
- `WithOptional`/`WithRequired` are replaced with parameterless
`AsOptional()`/`AsRequired()` methods.
  - The `ParameterResource.Required` setter is now internal.
- **Entra ID**
([r4552196738](#22185 (comment))):
`AddExistingEntraApplication` is renamed to
`AddExistingEntraIdApplication`.
- **OpenAI client builders**
([r4552196760](#22185 (comment))):
the OpenAI and Azure OpenAI client builders take `disableMetrics` as a
constructor parameter.
- **Diagnostic IDs**
([r4552196701](#22185 (comment))):
`ASPIREAZURE003` is meant for networking APIs. Four non-networking
experimental Azure APIs that used it now have their own IDs:
  - `AzureResourceInfrastructure.BicepExtensions` uses `ASPIREAZURE004`.
  - `IBicepOutputReferenceProvider` uses `ASPIREAZURE005`.
  - `ManagedIdentityRequiredAnnotation` uses `ASPIREAZURE006`.
  - `TenantScopedResourceAnnotation` uses `ASPIREAZURE007`.

  Pages for the new IDs still need to be added to aspire.dev.

Callers, tests, snapshots, READMEs, the playground and the polyglot
apphosts are updated to match. The generated API files are not edited.

Not addressed:

- The nullable string feedback
([r4552196649](#22185 (comment)))
is tracked in #22211.
- The SqlServer `WithRepl` feedback
([r4552196716](#22185 (comment)))
is left unchanged.

### Validation

These targeted test runs passed (`dotnet test --project <proj>
--no-launch-profile -- --filter-class ... --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"`):

- **`Aspire.Hosting.Azure.Tests`:** the affected classes passed 237/237.
- **`Aspire.Hosting.Azure.EntraId.Tests`:** 694/694 passed.
- **Parameter, OpenAI and other affected test classes:** passed, with
snapshots updated.

These were not validated locally:

- **`MSBuildTests`:** some fail locally and were skipped.
- **Java polyglot apphosts:** `javac` is unavailable locally, so they
were not compiled.

Fixes # (issue)

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [x] Yes
    - If yes, did you have an API Review for it?
      - [x] Yes
      - [ ] No
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [x] No
  - [ ] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Copilot App <[email protected]>
Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Nov 13, 2026
…splay name setter internal (#22205)

## Description

This PR addresses the API review feedback on the automated API surface
update in
#22185 (comment).

Since 13.6.5, there are four new ways to set the resource type display
name:

- the virtual `Resource.ResourceTypeDisplayName` property
- `ResourceTypeDisplayNameAnnotation`
- `WithResourceTypeDisplayName`
- the `init` setter on `CustomResourceSnapshot.ResourceTypeDisplayName`

The virtual property sets the label for a resource type, and
`WithResourceTypeDisplayName` sets it for one resource. Together they
cover every case, so this PR makes the other two internal:

- `ResourceTypeDisplayNameAnnotation` is now `internal`. It is how
`WithResourceTypeDisplayName` stores the value. Its empty-value check
was removed because the extension method already rejects empty values,
and it is the only place that creates the annotation.
- `CustomResourceSnapshot.ResourceTypeDisplayName` stays public to read,
but its setter is now `internal init`. Only
`ResourceNotificationService` sets it, using the annotation or the
virtual property. The order the label is chosen in does not change.

No code outside `Aspire.Hosting` creates the annotation or sets the
snapshot value. The generated polyglot code only calls
`WithResourceTypeDisplayName`, so code-generation snapshots do not
change. The `api/*.cs` files are generated, so this PR does not edit
them. The next automated API update will drop both members from the
diff.

`main` still has both members public, so it needs a forward-port.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [ ] Yes
- [x] No. Existing `ResourceNotificationTests`,
`AuxiliaryBackchannelRpcTargetTests` and `ResourcePublisherTests` cover
the behavior. This PR removes one assertion that built the annotation
directly.
- Did you add public API?
  - [ ] Yes
  - [x] No. This PR removes public API that has not shipped yet.
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

Co-authored-by: Sébastien Ros <[email protected]>
@aspire-repo-bot
aspire-repo-bot Bot force-pushed the update-api-diffs-release/17.0 branch 3 times, most recently from 72d9797 to 4b4e2c1 Compare November 15, 2026 16:22
@aspire-repo-bot
aspire-repo-bot Bot force-pushed the update-api-diffs-release/17.0 branch from 8eb7f25 to 6c4f1fe Compare November 18, 2026 16:23
@joperezr
Jose Perez Rodriguez (joperezr) merged commit 5019f6b into release/17.0 Nov 18, 2026
13 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 18, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

✅ No documentation update needed.

Branch: proven false positive (not an allowlist category). The PR is an automated bot update to the generated src/*/api/*.cs baseline files (63 files, all under */api/*.cs), which snapshot API surface already merged by earlier PRs. It changes no source, behavior, options or strings. The signals that fired (breaking_api_removal, new_public_type, and the other public-API surface signals) come only from the baseline diff. For example, src/Aspire.Hosting.Azure.ApiManagement/api/Aspire.Hosting.Azure.ApiManagement.cs is added with AzureApiManagementExtensions, and src/Aspire.Hosting/api/Aspire.Hosting.cs drops DisplayOrder. Each underlying API change should be documented against its original feature PR. Drafting a docs PR here would duplicate that work.

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

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants