Skip to content

Validation to prevent deletion of actively referenced Revisions #8570

@whaught

Description

@whaught

/area API

Intended as follow up to: #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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/APIAPI objects and controllerskind/featureWell-understood/specified features, ready for coding.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.triage/acceptedIssues which should be fixed (post-triage)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions