bug: An alert was sent out when a required command failed repeatedly
bug
**Describe the bug**
I created a config for a service that recently had a new version released. I install the service on the server via the package manager, so I use a `latest_version.require.command` to run a script that verifies that the new release has a corresponding release via the package manager. The script is written so if the package manager has the new version it returns 0, and 1 otherwise.
I noticed that whenever a required command fails the command is run dozens of times in the span of a few seconds over and over. Ideally this command would be run only on the interval of the configured service (in my case I'm using the default of 10m).
Despite the required command failing repeatedly, I got a notification for the new release.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a service with a `latest_version.require.command` that always returns non-zero
2. Ensure the service has a newer release than the deployed version
3. Watch the logs as the required command is run over and over
**Expected behavior**
I expected to see the required command run once a configured update interval, and not to get a notification until the required command was successful.
**Desktop (please complete the following information):**
- OS: Linux
- Browser: chrome
- Version: 143
**Additional context**
Redacted example of a service that triggered this for me:
```
service:
my/service:
latest_version:
type: github
url: my/service
require:
command: ["sh", "/bin/check-pkg.sh", "my_service", "{{ version }}"]
deployed_version:
type: url
url: https://service.example.com/api/version
regex: "([0-9.]+)"
notify:
ntfy:
params:
click: "https://github.com/my/service/releases/{{ version }}"
web_url: "https://github.com/my/service/releases/{{ version }}"
```
关闭于 2026-01-12 5 条评论