Skip to content

refactor(resampling): require explicit max_data_age_in_periods - #1459

Closed
malteschaaf wants to merge 1 commit into
frequenz-floss:v1.x.xfrom
malteschaaf:remove-max-data-age-default
Closed

malteschaaf wants to merge 1 commit into
frequenz-floss:v1.x.xfrom
malteschaaf:remove-max-data-age-default

Conversation

@malteschaaf

Copy link
Copy Markdown
Contributor

Removes the `3.0` default of `max_data_age_in_periods` from `ResamplerConfig` and `ResamplerConfig2`. The value looks rather arbitrary, and by default it makes the resampler smooth over three periods. Following the discussion in #1344, apps should set it explicitly (e.g. via env vars) so we can experiment with it per site before settling on a better value.

All existing call sites now pass `3.0` explicitly, so the behavior doesn't change.

- Remove the 3.0 default from ResamplerConfig and ResamplerConfig2 so apps
  choose a value consciously and can tune it per site
- Pass 3.0 explicitly at all existing call sites to keep current behavior
- Document the smoothing vs. responsiveness tradeoff and add upgrade notes

Signed-off-by: Malte Schaaf <malte.schaaf@frequenz.com>
@malteschaaf
malteschaaf requested a review from a team as a code owner September 30, 2026 16:12
@malteschaaf
malteschaaf requested review from shsms and removed request for a team September 30, 2026 16:12
@github-actions github-actions Bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:data-pipeline Affects the data pipeline labels Sep 30, 2026
@malteschaaf
malteschaaf marked this pull request as draft September 30, 2026 18:51
@llucax llucax added the scope:breaking-change Breaking change, users will need to update their code label Oct 1, 2026
@malteschaaf

Copy link
Copy Markdown
Contributor Author

Closing this in favour of #1473. Removing the default right away would break every caller at once, so the issue instead suggests changing the defaults only in ResamplerConfig2, after the edge app sets closed and label explicitly via env vars (like it already does for max_data_age_in_periods). I'm testing max_data_age_in_periods=1.0 on single sites through RESAMPLING_MAX_DATA_AGE_IN_PERIODS and will share the results in the issue.

@github-project-automation github-project-automation Bot moved this from To do to Done in Python SDK Roadmap Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests scope:breaking-change Breaking change, users will need to update their code

Projects

Development

Successfully merging this pull request may close these issues.

2 participants