Show Holt-Winters forecast for Deployment Frequency
What does this MR do and why?
This MR adds support for the holt winters forecasting model in the Deployment Frequency charts. This model will replace the linear regression method introduced in https://gitlab.com/gitlab-org/gitlab/-/issues/403630+.
This MR:
- Adds the
use_holt_winters_forecast_for_deployment_frequency
feature flag to toggle between holt winters and linear regression - Adds a loading state while the forecast is being built
- Adds error states for the reqest failure, or a poor forecast
- Minor refactor of when the request was made to ensure we only request a forecast after the terms are agreed
Screenshots or screen recordings
Before / After
Feature flag disabled | Feature flag enabled |
---|---|
Screen_Recording_2023-07-25_at_12.48.33_pm | Screen_Recording_2023-07-12_at_5.57.06_pm |
Error states
Error - Poor forecast | Error - Request failure |
---|---|
Screen_Recording_2023-07-12_at_5.47.36_pm | Screen_Recording_2023-07-12_at_5.50.07_pm |
How to set up and validate locally
You will need to enable 2 feature flags
dora_charts_forecast # group
use_holt_winters_forecast_for_deployment_frequency # per project
- Seed data for your project
- Enable
dora_charts_forecast
for thegroup
Feature.enable(:dora_charts_forecast, Group.find(GROUP_ID))
- Enable
use_holt_winters_forecast_for_deployment_frequency
for the projectFeature.enable(:use_holt_winters_forecast_for_deployment_frequency, Project.find(PROJECT_ID))
- Browse to http://{local-instance}/{project-path}/-/pipelines/charts?chart=deployment-frequency
- Click the toggle
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #409875 (closed)
Edited by Ezekiel Kigbo