Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource delete handling #30

Open
1 task done
lemarier opened this issue Apr 30, 2023 · 0 comments
Open
1 task done

Resource delete handling #30

lemarier opened this issue Apr 30, 2023 · 0 comments
Labels
enhancement New feature or request mashin_runtime Related to `mashin_runtime`

Comments

@lemarier
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Motivation

Trigger delete on the resource when its removed from the MashinScript

Request

Right now we simply delete from the state

mashin/cli/src/cli.rs

Lines 125 to 132 in f55b974

// delete non-present resources that will not receive any hooks
// probably removed within the client code (TS)
for (urn, resource) in executed_resouces.iter() {
if resource.required_change == Some(ResourceAction::Delete) {
let urn = Urn::from_str(urn)?;
backend.borrow().delete(&urn)?;
}
}

Solution

We should call it from the runtime, and trigger the resource delete on the provider

Are you willing to help with this request?

Yes!

@lemarier lemarier added the enhancement New feature or request label Apr 30, 2023
@lemarier lemarier changed the title Delete handling Resource delete handling Apr 30, 2023
@lemarier lemarier added the mashin_runtime Related to `mashin_runtime` label Apr 30, 2023
@lemarier lemarier added this to mashin Apr 30, 2023
@lemarier lemarier self-assigned this Apr 30, 2023
@lemarier lemarier moved this to Todo in mashin Apr 30, 2023
@lemarier lemarier removed their assignment Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mashin_runtime Related to `mashin_runtime`
Projects
Status: Todo
Development

No branches or pull requests

1 participant