Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add db migration to add cascade deletion on `fk`s Signed-off-by: wslulciuc <willy@datakin.com> * Add `DbDataRetention` and `dataRetentionInDays` config Signed-off-by: wslulciuc <willy@datakin.com> * Add `DbRetentionJob` Signed-off-by: wslulciuc <willy@datakin.com> * Add `DbRetentionCommand` Signed-off-by: wslulciuc <willy@datakin.com> * Add `frequencyMins` config for runs and rename `dbRetentionInDays` Signed-off-by: wslulciuc <willy@datakin.com> * Add docs to `DbRetentionJob` and minor renaming Signed-off-by: wslulciuc <willy@datakin.com> * Wrap `DbRetention.retentionOnDbOrError()` in `try/catch` Signed-off-by: wslulciuc <willy@datakin.com> * Add docs to DbRetention Signed-off-by: wslulciuc <willy@datakin.com> * continued: Add docs to `DbRetention` Signed-off-by: wslulciuc <willy@datakin.com> * Add handling of `errorOnDbRetention` Signed-off-by: wslulciuc <willy@datakin.com> * Add docs to `DbException` and `DbRetentionException` Signed-off-by: wslulciuc <willy@datakin.com> * `info` -> `debug` when inserting column lineage Signed-off-by: wslulciuc <willy@datakin.com> * Remove `dbRetention.enabled` Signed-off-by: wslulciuc <willy@datakin.com> * Update handling of `StatementException` Signed-off-by: wslulciuc <willy@datakin.com> * Minor changes Signed-off-by: wslulciuc <willy@datakin.com> * Add `docs/faq.md` Signed-off-by: wslulciuc <willy@datakin.com> * continued: `Add docs/faq.md` Signed-off-by: wslulciuc <willy@datakin.com> * continued: Add `docs/faq.md` Signed-off-by: wslulciuc <willy@datakin.com> * continued: Add `docs/faq.md` Signed-off-by: wslulciuc <willy@datakin.com> * Define `DEFAULT_RETENTION_DAYS` constant in `DbRetention` Signed-off-by: wslulciuc <willy@datakin.com> * Make chunk size in retention query configurable Signed-off-by: wslulciuc <willy@datakin.com> * Remove `DATA_RETENTION_IN_DAYS` from `MarquezConfig` Signed-off-by: wslulciuc <willy@datakin.com> * Update docs for chunk size config Signed-off-by: wslulciuc <willy@datakin.com> * Remove error log from `DbRetention.retentionOnDbOrError()` Signed-off-by: wslulciuc <willy@datakin.com> * Use `LOOP` for retention Signed-off-by: wslulciuc <willy@datakin.com> * continued: Use `LOOP` for retention Signed-off-by: wslulciuc <willy@datakin.com> * Use `numberOfRowsPerBatch` Signed-off-by: wslulciuc <willy@datakin.com> * Use `--number-of-rows-per-batch` Signed-off-by: wslulciuc <willy@datakin.com> * Add pause to prevent lock timeouts Signed-off-by: wslulciuc <willy@datakin.com> * Add `FOR UPDATE SKIP LOCKED` Signed-off-by: wslulciuc <willy@datakin.com> * Add `sql()` Signed-off-by: wslulciuc <willy@datakin.com> * Add `--dry-run` Signed-off-by: wslulciuc <willy@datakin.com> * Add `jdbi3-testcontainers` Signed-off-by: wslulciuc <willy@datakin.com> * Remove shortened flag args Signed-off-by: wslulciuc <willy@datakin.com> * Use `marquez.db.DbRetention.DEFAULT_DRY_RUN` Signed-off-by: wslulciuc <willy@datakin.com> * Add DbRetention.retentionOnRuns() Signed-off-by: wslulciuc <willy@datakin.com> * Add `DbMigration.migrateDbOrError(DataSource)` Signed-off-by: wslulciuc <willy@datakin.com> * Add `TestingDb` Signed-off-by: wslulciuc <willy@datakin.com> * Add `DbTest` Signed-off-by: wslulciuc <willy@datakin.com> * Add `testRetentionOnDbOrError_withDatasetsOlderThanXDays()` Signed-off-by: wslulciuc <willy@datakin.com> * Remove `jobs.DbRetentionConfig.dryRun` Signed-off-by: wslulciuc <willy@datakin.com> * Add `--dry-run` option to `faq.md` Signed-off-by: wslulciuc <willy@datakin.com> * continued: Add --dry-run option to faq.md Signed-off-by: wslulciuc <willy@datakin.com> * continued: `Add testRetentionOnDbOrError_withDatasetsOlderThanXDays` Signed-off-by: wslulciuc <willy@datakin.com> * Fix retention query for datasets and dataset versions Signed-off-by: wslulciuc <willy@datakin.com> * Add test for retention on dataset versions Signed-off-by: wslulciuc <willy@datakin.com> * Add comments to tests Signed-off-by: wslulciuc <willy@datakin.com> * Add `testRetentionOnDbOrErrorWithDatasetVersionsOlderThanXDays_skipIfVersionAsInputForRun()` Signed-off-by: wslulciuc <willy@datakin.com> * Add `testRetentionOnDbOrErrorWithJobsOlderThanXDays()` Signed-off-by: wslulciuc <willy@datakin.com> * Add `testRetentionOnDbOrErrorWithJobVersionsOlderThanXDays()` Signed-off-by: wslulciuc <willy@datakin.com> * Add tests for dry run Signed-off-by: wslulciuc <willy@datakin.com> * Add testRetentionOnDbOrErrorWithRunsOlderThanXDays() Signed-off-by: wslulciuc <willy@datakin.com> * Add `testRetentionOnDbOrErrorWithOlEventsOlderThanXDays()` Signed-off-by: wslulciuc <willy@datakin.com> * continued: `Add testRetentionOnDbOrErrorWithOlEventsOlderThanXDays()` Signed-off-by: wslulciuc <willy@datakin.com> * Add `javadocs` to `DbRetention` Signed-off-by: wslulciuc <willy@datakin.com> * Run tests in order of retention Signed-off-by: wslulciuc <willy@datakin.com> --------- Signed-off-by: wslulciuc <willy@datakin.com> Co-authored-by: Harel Shein <harel.shein@astronomer.io>
- Loading branch information