You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
direct: pass last-persisted state to DoDelete (#5279)
## Summary
Extends `IResource.DoDelete` to take the resource's last-persisted state
alongside `id`. The framework loads it from `dstate` in
`DeploymentUnit.Delete` and `DeploymentUnit.Recreate`, and
`Adapter.DoDelete` forwards it to the resource implementation. No
behavioral change in this PR: every existing resource ignores the new
argument (`_ *FooState`).
Motivation: some delete APIs need values that come from local config
(e.g. `postgres_project.purge_on_delete`, which is set on the user's
resource and forwarded to the Lakebase DeleteProject RPC). Today there
is nowhere to plumb those values because `DoDelete` only sees the
resource id. This change keeps the call symmetric with
`DoCreate`/`DoUpdate`, which already receive state.
Adapter-level validation now type-checks `DoDelete state` the same way
it already does for `DoCreate newState`.
## Test plan
- [x] Unit + acceptance suites pass (`go test ./bundle/...`, `go test
./acceptance/...`); no fixture updates needed since behavior is
unchanged.
This pull request and its description were written by Isaac.
// [Optional] OverrideChangeDesc can implement custom logic to update a given ChangeDesc; it is run last after built-in classifiers and field triggers.
0 commit comments