Repository navigation
feat(aspire)!: build AddKubeOps on path-based Aspire 17 projects - #1340
Conversation
38b283c to
c3dd6e7
Compare
kimpenhaus
left a comment
There was a problem hiding this comment.
Review notes for this branch from a code review, a simplify pass (reuse, simplification, efficiency, altitude) and a security review. None of the points are applied yet; each inline comment ends with a proposal and waits for a decision. The security review found nothing.
Point 10 is a file comment on examples/AspireAppHost/AspireAppHost.csproj.
Merge state: auto-merge is disabled and the PR is a draft. The squash title deps(core): update aspire monorepo to v17 would release this breaking change as a patch; the title and description still need to become feat(aspire)!: … (v15.0.0) with a link to the migration guide.
Validated so far: Release build without warnings, dotnet format --verify-no-changes, docs build, full test suite against a local OrbStack cluster (1888 passed, 0 skipped), run mode (CRD install, reconcile, finalizer) and manifest publish against OrbStack, renovate-config-validator --strict.
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
## What Removes the `MessagePack` pin from `KubeOps.Aspire.Hosting` (`PackageReference` and the central `PackageVersion`). ## Why The pin was added to keep the transitive `MessagePack` (via `Aspire.Hosting` → `StreamJsonRpc`) out of [GHSA-hv8m-jj95-wg3x](GHSA-hv8m-jj95-wg3x), which affects `< 2.5.301` and `>= 3.0.214-rc.1, < 3.1.7`. `Aspire.Hosting` 13.6.5 (current `main`) and 17.0.0 both reference `MessagePack` 2.5.307 and `StreamJsonRpc` 2.25.29 (which brings 2.5.302) directly, all outside the vulnerable ranges. The pin no longer protects anything; it only forces `MessagePack` 3.x onto every consumer of `KubeOps.Aspire.Hosting`, while Aspire and `StreamJsonRpc` are built against 2.5.x. Found while reviewing #1340 (point 6). ## Behavioural change `KubeOps.Aspire.Hosting` now resolves `MessagePack` 2.5.307, the version Aspire ships with, instead of 3.1.12. Consumers that reference `MessagePack` 3.x themselves keep their version. ## Validation - `dotnet list package --vulnerable --include-transitive` for `KubeOps.Aspire.Hosting`: no vulnerable packages - Release build of `KubeOps.Aspire.Hosting.Test` (incl. the example AppHost) and its 36 tests pass
Aspire.Hosting.Kubernetes is stable since Aspire 17.0, so drop the renovate rule that allowed prerelease updates for it.
Aspire 17 deprecates AddProject<TProject> and the Aspire.AppHost.Sdk in favour of AddDotnetProject(name, path). AddKubeOps now takes the operator project path and returns IResourceBuilder<DotnetProjectResource>; PublishAsKubernetesOperator, RunWithKubernetes and WithWebhookDevTunnel extend that builder. The resolved project path comes from the project's IProjectMetadata annotation. The example AppHost is a plain Microsoft.NET.Sdk project on Aspire.Hosting.AppHost 17, the example KubeOps CLI path works on every OS, and the OpenTelemetry example uses 1.21.0. The hosting tests use a plain DistributedApplication builder, because the testing builder runs the example's AddDotnetProject and rejects a second one. BREAKING CHANGE: KubeOps.Aspire.Hosting requires Aspire 17. AddKubeOps<TProject>(name) and AddKubeOps<TProject>(name, configureManifests) are replaced by AddKubeOps(name, projectPath) and AddKubeOps(name, projectPath, configureManifests), which return IResourceBuilder<DotnetProjectResource> instead of IResourceBuilder<ProjectResource>. See https://dotnet.github.io/dotnet-operator-sdk/docs/operator/migration#upgrading-from-v14-to-v15
- AddKubeOps rejects projects that are no C# project (.fsproj, .vbproj, file-based apps): the KubeOps CLI only handles .csproj, so they failed only when CRDs were installed or manifests published. - Read the project path with Aspire's GetProjectMetadata() instead of looking up the annotation, which also drops an unreachable throw. - Re-enable Renovate for Aspire.Hosting.AppHost in the example AppHost, so it no longer falls behind the Aspire packages in src/. - Drop IsAspireHost from the example AppHost; Aspire.Hosting.AppHost sets it. - Docs: the Aspire CLI bundle an Aspire 17 AppHost needs (Aspire page and running the SDK tests), the KubeOps.Aspire.Hosting reference in the AppHost snippet and the .csproj restriction. - Narrow the test builder comment to DistributedApplicationTestingBuilder and re-pad the README package table.
38c8dc0 to
eeeb738
Compare
|
🎉 This PR is included in version 15.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
KubeOps.Aspire.Hostingrequires Aspire 17.AddKubeOps<TProject>(name)andAddKubeOps<TProject>(name, configureManifests)are replaced byAddKubeOps(name, projectPath)andAddKubeOps(name, projectPath, configureManifests), which returnIResourceBuilder<DotnetProjectResource>instead ofIResourceBuilder<ProjectResource>.PublishAsKubernetesOperator,RunWithKubernetesandWithWebhookDevTunnelextend that builder.AddKubeOpsonly accepts C# projects (.csproj).The AppHost is a plain
Microsoft.NET.Sdkproject onAspire.Hosting.AppHost17; building it needs the Aspire CLI bundle, which the first build downloads to~/.aspire.Aspire 17: What's new in Aspire 17
Migration: Upgrading from v14 to v15
This PR contains the following updates:
13.6.5→17.0.013.6.5→17.0.013.6.5-preview.1.26559.7→17.0.013.6.5→17.0.0Release Notes
microsoft/aspire (Aspire.Hosting)
v17.0.0: Aspire 17.0.0Aspire 17.0.0
Aspire 17.0 brings a resource-first dashboard, Go AppHosts in preview, stable .NET project hosting and Kubernetes deployment packages, and new Microsoft Entra ID and Azure API Management integrations. Shell completion, shared team configuration, environment-specific secrets, richer editor tooling, and a preview tray companion make it easier to build, inspect, and deploy applications across languages.
Highlights
aspire describe --format mermaidcan export your resource graph.aspire neworaspire init --language go, with no experimental feature flag required. Go templates, VS Code launch and debugging,aspire doctortooling checks, generated SDK documentation, andaspire sdk export --language goround out the preview.Aspire.Hosting.Dotnetnow ships as a stable package, with path-basedAddDotnetProject, SDK-style C#, F#, and Visual Basic support, and parallel builds within compatible project groups. Deno hosting, Next.js hosting and JavaScript publishing, core pipeline and deployment-state APIs, HTTP probes, and MCP endpoint declarations also graduate from experimental.--envvaravoid putting secret values on the command line. Agent setup selects clients and project or global scope, configuring plugins instead of copying bundled skill folders.aspire update --config-source.aspire tray startkeeps local AppHosts within reach from the macOS menu bar, Windows notification area, or a supported Linux desktop tray. The companion requires a native CLI installation; Linux support also requires a graphical desktop session and GTK 3.Aspire.Azure.AI.Extensions.OpenAIandAspire.Azure.AI.Projectsclient integrations support Azure OpenAI and Foundry using the updated SDKs.Aspire's minimum supported .NET version is now .NET 10; this does not require every orchestrated workload to retarget.
AddProject,AddCSharpApp, andAspire.AppHost.Sdkremain available but are deprecated in favor of path-based .NET project registration and standardMicrosoft.NET.SdkAppHosts. C# AppHosts also require the Aspire CLI bundle.Other notable changes include removal of the legacy RabbitMQ v6 and MongoDB v2 client integrations, replacement of the Azure AI OpenAI and Inference packages, service-provider-aware Cosmos DB client callbacks, renamed polyglot feature flags, and rejection of empty required parameter values. Kubernetes deployment requires Helm 4.0.0 or later, and AKS defaults to the paid Standard control-plane tier with separate user-assigned identities; review existing-cluster updates and custom permissions. MongoDB's default container image advances to 9.0, so review persistent-data compatibility or pin the previous tag.
See the full list and migration guidance in the Aspire 17.0 breaking changes.
📖 Learn more
For complete details, examples, migration guidance, and everything new in this release, read What's new in Aspire 17.0.
Thank you to all the community contributors who helped make Aspire 17.0 possible! 💜
Full Changelog: v13.6.5...v17.0.0
Full commit: 2d325b13709752ba6d9a943635c5e2940a2530c0
Configuration
📅 Schedule: (in timezone Europe/Zurich)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.