astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
238 stars 46 forks source link

Set and enforce a maximum storage TTL for datastreams #912

Closed Annopaolo closed 5 months ago

Annopaolo commented 6 months ago

While support for using a maximum period for datastreams data retention in a given realm is already present in DUP/AppEngine since 0.10, there was no support for setting its value. Add it. The value (in seconds) can be specified in Housekeeping API at realm creation, or changed with a realm update. When changed, it will apply oly to new data, i.e. data sent after the change. Defaults to none, as before.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 73.07692% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 68.14%. Comparing base (965ed38) to head (cbf8cce). Report is 9 commits behind head on master.

Files Patch % Lines
...e_housekeeping/lib/astarte_housekeeping/queries.ex 72.91% 13 Missing :warning:
...te_housekeeping/lib/astarte_housekeeping/engine.ex 80.95% 4 Missing :warning:
...ib/astarte_data_updater_plant/data_updater/impl.ex 62.50% 3 Missing :warning:
...g_api/realms/non_negative_integer_or_unset_type.ex 33.33% 2 Missing :warning:
...i/lib/astarte_housekeeping_api/rpc/housekeeping.ex 75.00% 2 Missing :warning:
...keeping_api_web/controllers/fallback_controller.ex 0.00% 2 Missing :warning:
...b/astarte_housekeeping_api_web/views/error_view.ex 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #912 +/- ## ========================================== + Coverage 68.08% 68.14% +0.05% ========================================== Files 274 274 Lines 7093 7191 +98 ========================================== + Hits 4829 4900 +71 - Misses 2264 2291 +27 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Annopaolo commented 6 months ago

~Based on https://github.com/astarte-platform/astarte_rpc/pull/81~