knative / knative/serving

Validation to prevent deletion of actively referenced Revisions

Open
#8,570 15 comments 0 reactions 0 assignees View on GitHub
area/API kind/feature lifecycle/frozen triage/accepted
Dominant language
Go
Stars
6.1k
Forks
1.2k
Avg merge
2d 7h
Merged PRs (30d)
2

Description

/area API

Intended as follow up to: https://github.com/knative/serving/issues/8208

## Describe the feature

We will start labelling revisions with pending/active/retired states such that all in-progress deployments and actively serving revisions should be marked. We also recently added DELETE support to the webhooks for validation.

We should
* Create a feature flag for prevent-actively-serving-delete validation
* Create a new hook that fails validation when pending/active are present on a revision
* e2e test trying to delete an active revision
* e2e test that cascading deletions are not blocked

This feature can remain optional, but it is likely that users don't intend to delete revisions that are active/pending. This will make it important to ensure pending states are resolved within the pending deployment time. We will want to give users a nice error message about why their deletion request has failed and may want to consider a --force option to bypass validation (actually we could consider such a header generically for bypassing validation, maybe that's a separate issue).

Contributor guide

Open the contributing guide

Research direction

Start with the existing DELETE validation support in the webhooks and the revision pending/active/retired states described here, then review follow-up issue #8208 for context. Define the feature flag and validation behavior, add an end-to-end test for deleting an active revision, and verify that cascading deletions remain allowed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.