NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.28k stars 14.27k forks source link

Renovate service restart loop #358028

Open l0b0 opened 2 days ago

l0b0 commented 2 days ago

Issue description

The Renovate service is configured to restart on failure. This is surprising, and could cause API throttling or infrastructure costs. This probably should be a one-shot service, especially when services.renovate.schedule is set.

Ping @Scrumplex @NyCodeGHG

Steps to reproduce

Set services.renovate.enable = true; and start the service with world state such that it will fail to run every time.

Technical details

NyCodeGHG commented 1 day ago

there has been a discussion in #334557 about Type=oneshot. It has been set to simple, because otherwise nixos-rebuild blocks if renovate is running at the same time. Adding an option to turn off restart would be an idea. You can also add rate limits to renovate's systemd unit using StartLimitIntervalSec and StartLimitBurst

l0b0 commented 1 day ago

Thanks for the quick response! I've had a look through #334557, and considering all the arguments and counter-arguments I wonder whether making the type configurable might be a good compromise. I definitely do not ever want Renovate to run more than scheduled, and I can absolutely live with nixos-rebuild taking a few minutes extra for the single relevant host.