Skip to content

Radius.Core/environments differs in deletion behaviour from Applications.Core/environments type #12486

Description

@lakshmimsft

Deletion call on Applications.Core/environments enumerates every application in the environment and deletes each application (which in turn deletes its resources) before removing the environment itself (pkg/cli/clients/management.go:675 ):

applications, _ := amc.ListApplicationsInEnvironment(ctx, name)
for _, application := range applications {
    _, err := amc.DeleteApplication(ctx, *application.ID, false)  // cascade: app -> its containers
}

the new type Radius.Core/environments deletes only the environment resource.

client := r.RadiusCoreClientFactory.NewEnvironmentsClient()
_, err := client.Delete(ctx, r.Workspace.Scope, r.EnvironmentName, ...)  // environment only

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething is broken or not working as expectedimportantThis item is a high priority Issue we intend to address as soon as possibletriagedThis issue has been reviewed and triaged

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions