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
{{ message }}
Repository navigation
DataRetention cannot be extended by distributions built on OpenMetadata #31987
DataRetention (openmetadata-service/.../apps/bundles/dataRetention/DataRetention.java) hardcodes every cleanup it performs. A distribution built on OpenMetadata that adds its own tables has no way to prune them on the same schedule.
Its only options today are:
run a second scheduled app, duplicating the batching, entity stats, ACTIVE_ERROR reporting and failure isolation that DataRetention already implements; or
not prune at all.
Neither is good. The retention job is exactly the right place for this work — it already knows how to drain a table in batches, record per-entity stats, and mark a run partially failed without aborting the rest.
Proposal
A DataRetentionExtension SPI, following the MigrationProcessExtensionProvider idiom already used for out-of-tree migrations (ServiceLoader + META-INF/services). A provider contributes named RetentionSteps; DataRetention feeds each through its existing executeWithStatsTracking, so extensions inherit the same batching, stats and error reporting as the built-ins.
Extensions run after every built-in cleanup, so a job that fails partway still leaves OpenMetadata's own tables pruned. A provider that throws is isolated and reported rather than allowed to stop the others.
Extension config rides a new extensions map on DataRetentionConfiguration. This is load-bearing rather than cosmetic: DataRetention.init converts with the strict JsonUtils.OBJECT_MAPPER (FAIL_ON_UNKNOWN_PROPERTIES is only disabled on OBJECT_MAPPER_LENIENT), so a downstream key added anywhere but a declared property throws at app init. Declaring it keeps the outer additionalProperties: false, so typos in the built-in keys are still caught.
Nothing changes for an installation with no extensions registered.
Activity
Fixes open-metadata#31987: let distributions register their own DataR…
Fixes #31987: let distributions register their own DataRetention clea…