Skip to content

Commit

Permalink
When APIs are deleted, delete any deployments that they own. (#395)
Browse files Browse the repository at this point in the history
(This is for consistency with existing behavior. In the future we will block deletion of objects when children exist unless a `force` argument is present and true.)
  • Loading branch information
timburks authored Nov 22, 2021
1 parent 5795e43 commit 49be373
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/registry/internal/storage/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ func (d *Client) DeleteApi(ctx context.Context, name names.Api) error {
gorm.VersionEntityName,
gorm.SpecEntityName,
gorm.SpecRevisionTagEntityName,
gorm.DeploymentEntityName,
gorm.DeploymentRevisionTagEntityName,
gorm.ArtifactEntityName,
gorm.BlobEntityName,
} {
Expand Down

0 comments on commit 49be373

Please sign in to comment.