Loki configuration for compaction

Hey Grafana Community,

I’m looking to enforce compaction and data retention policies on Loki.

I’m looking at the docs (Retention | Grafana Loki documentation) and it looks like these lines are what is needed:
compactor:
# compaction_interval: 10m
# retention_enabled: true
# retention_delete_delay: 2h

The loki process fails when I try to restart it using systemctl.

– The job identifier is 420776.
Aug 29 12:19:42 loki[1617778]: failed parsing config: loki.yml: yaml: unmarshal errors:
Aug 29 12:19:42 loki[1617778]: line 45: field retention_enabled not found in type compactor.Config
Aug 29 12:19:42 loki[1617778]: line 46: field retention_delete_delay not found in type compactor.Config
Aug 29 12:19:42 systemd[1]: loki.service: Main process exited, code=exited, status=1/FAILURE

The error message doesn’t seem to make sense to me. YAML formatting looks ok and I’m using key-values defined in the doc. Does anyone have any suggestions on how to fix it?

Best,
Jason