diff --git a/beps/0006-scaffolder-action-rollback/README.md b/beps/0006-scaffolder-action-rollback/README.md new file mode 100644 index 0000000000..fd6c7911b9 --- /dev/null +++ b/beps/0006-scaffolder-action-rollback/README.md @@ -0,0 +1,84 @@ +--- +title: Scaffolder Action Rollback +status: provisional +authors: + - 'bnechyporenko@bol.com' + - 'benjaminl@spotify.com' +owners: + - '@backstage/scaffolder-maintainers' +project-areas: + - scaffolder +creation-date: 2024-03-13 +--- + +# BEP: + +[**Discussion Issue**](https://github.com/backstage/backstage/issues/NNNNN) + +- [Summary](#summary) +- [Motivation](#motivation) + - [Goals](#goals) + - [Non-Goals](#non-goals) +- [Proposal](#proposal) +- [Design Details](#design-details) +- [Release Plan](#release-plan) +- [Dependencies](#dependencies) +- [Alternatives](#alternatives) + +## Summary + +Introducing the rollback to scaffolder actions provides the mean to come back to the initial state. + +## Motivation + +The aim is to help to mitigate the issue of manual clean up the partially created resources. + +### Goals + +- We will extend action's API to be able to run rollback for failed tasks +- Rollback will be optional + +### Non-Goals + +We will not cover all built-in actions with a rollback functionality + +## Proposal + +Rollback is going to be performed: + +- when user manually decide to perform this action. +- task has to be recovered and TaskRecoverStrategy set to 'rollback' + +## Design Details + +We are going to introduce an extra function in action API which will look like: + +```typescript +const createPublishGitHubAction = createTemplateAction({ + id: 'publish:github', + async handler() {}, + async rollback() {}, +}); +``` + +## Release Plan + + + +## Dependencies + + + +## Alternatives + +