fix: respect minimal telemetry on manual stats send and download

Merged
HU
19h ago
+3-3

Summary

With minimal telemetry on (the disable_stats setting in EE), the scheduled send drops the detailed sections, but the superadmin Send usage and Download usage actions always built the full payload (minimal = false). Git sync usage was also never gated on minimal, so even the scheduled minimal payload carried it.

Changes

  • windmill-api-settings: send_stats and get_stats pass the disable_stats setting as minimal, the same value the scheduled send uses. Both read the saved setting, so a toggle change has to be saved before it applies.
  • EE (stats_ee.rs, companion PR windmill-labs/windmill-ee-private): git_sync_usage is omitted when minimal is true, like feature_usage, instance_onboarding, resource_usage and infra_info.
  • ee-repo-ref.txt bumped to the companion commit.

Test plan

  • EE binary (enterprise,private), one git sync repo configured, GET /api/settings/get_stats:
    • disable_stats=false: git_sync_usage {sync_repos: 1}, onboarding, resource usage and infra info present
    • disable_stats=true: all four are absent
  • Send usage not observed on the wire (needs dev_override to point at a local stats stub); it calls the same payload builder with the same flag.

šŸ¤– Generated with Claude Code


Summary by cubic

Fixes manual telemetry actions so they respect the minimal telemetry setting, matching the scheduled send behavior.

Previously, the superadmin Send usage and Download usage actions always built the full stats payload even when disable_stats was enabled, and git sync usage was included in scheduled minimal payloads too. Now both manual actions read the saved disable_stats setting and pass it as the minimal flag, and git sync usage is omitted from minimal payloads in the EE code.

  • The setting is read from the saved value, so a toggle change must be saved before it applies to the next manual send or download.