-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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:
- Create a service with a
latest_version.require.commandthat always returns non-zero - Ensure the service has a newer release than the deployed version
- 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 }}"