ash icon indicating copy to clipboard operation
ash copied to clipboard

clear metadata from records passed to for_update/destroy

Open barnabasJ opened this issue 3 months ago • 2 comments

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

AI Policy

  • [x] I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.

Versions

Some metadata, like upsert_skipped, could be passed down to changes if it's not cleared from the resource when we accept the record as input. This could lead to changes doing the wrong thing if they check for values inside the record's metadata.

Operating system

Ubuntu 24.04

Current Behavior

No response

Reproduction

No response

Expected Behavior

No response

barnabasJ avatar Oct 01 '25 13:10 barnabasJ

For now we can do this just for upsert_skipped?.

zachdaniel avatar Oct 02 '25 03:10 zachdaniel

And this should happen as basically the first thing in Ash.Changeset.for_update and Ash.Changeset.for_destroy.

zachdaniel avatar Oct 02 '25 03:10 zachdaniel