Skip to content

[Breaking change]: Removal of DockerComposePublisher, KubernetesPublisher and AzurePublisher #3373

Closed
@davidfowl

Description

@davidfowl

Description

We removed AddDockerComposePublisher, AddKubernetesPublisher and AddAzurePublisher APIs.

Version

.NET Aspire 9.3

Previous behavior

9.2 introduced a preview version of the publisher API and introduced 3 new publishers:

  1. DockerCompose
  2. Kubernetes
  3. Azure

These were accompanied by an API on IDistributedApplicationBuilder.AddXPublisher methods. Adding multiple publisher was supported, and the aspire publish CLI command would let you pick one.

New behavior

In 9.3 we've removed these publishers in favor of new resource types:

  • DockerEnvironmentResource
  • KuberentesEnvironmentResource
  • AzureEnvironmentResource

These resources have a new PublisherCallbackAnnotation that describes their publish behavior. This new publisher (the default publisher) looks at all resources that have this new annotation and invokes the callback to produce assets. The aspire publish command has changed to use the default publisher and emit whatever is described in your application with these resources (you never pick a publisher).

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

dotnet/aspire#9089 explains the whole thing

Recommended action

Use the new APIs:

  • builder.AddDockerComposeEnvironment(..)
  • builder.AddKubernetesEnvironment(..)
  • builder.AddAzureEnvironment(..) (implicit with any azure resource)

Affected APIs

IDistributedApplicationBuilder.AddDockerComposePublisher
IDistributedApplicationBuilder.AddKuberentesPublisher
IDistributedApplicationBuilder.AddAzurePublisher


Associated WorkItem - 431125

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.Pri1High priority, do before Pri2 and Pri3area-docsdoc-ideaIndicates issues that are suggestions for new topics [org][type][category]⛓️‍💥 breaking-changeIssues or PRs tracking breaking changes.

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions