apache / apache/openwhisk

Allow package deletion for non-empty packages.

Open
#1,824 3 comments 4 reactions 0 assignees View on GitHub
API enhancement
Dominant language
Scala
Stars
6.8k
Forks
1.2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

## Environment details:

IBM Bluemix (US-South)

## Steps to reproduce the issue:

```
wsk package create service_package
wsk action create service_package/hello handler.js
wsk package delete service_package
```

## Provide the actual results and outputs:

```
error: Package delete failed: Package not empty (contains 1 entity) (code 4577263)
```

## What do you want to change?

I want the API to support removing packages which aren't empty.

I understand this behaviour could cause accidental delete issues and would like a flag `force` to enable this.

## Why do you want this change?

Packages are a convenient mechanism to group functions, triggers and rules into "services".

Being able to remove a package and have the contents removed is a much faster way to handle removing services without having to manually issue the individual delete calls for each resource.

In the Serverless Framework integration, I'm going to starting using this packages to deploy "services". https://github.com/serverless/serverless-openwhisk/issues/29.

Before updating a service, I need to clear out the current resources that might have been removed from the configuration file. When the user wants to remove a service, I'll need to delete all resources.

This will currently require a large amount of boilerplate code, retrieving all the package resources and firing off individual API calls.

Contributor guide

Open the contributing guide

Research direction

The issue names the `wsk package create`, `wsk action create`, and `wsk package delete` commands as the reproduction entry point; start by running them and tracing the package-delete API path. Done means a force option can remove a package and its contained resources while the default still rejects non-empty packages, with coverage for both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.