BigBoot/AutoKuma

Unsupported static monitor file type

Closed this issue · 1 comments

Currently autokuma fails to create monitors if there is anything else besides .json or .toml files in the directory, if autokuma would explicitly look only for .json and .toml files it should not break anything, but it would fix at least one scenario where we are running autokuma in kubernetes and mounting configmaps as volumes which creates links in the directory:

root@autokuma-58fb5b9fdf-b97mc:/autokuma/static-monitors# ls
example.json

root@autokuma-58fb5b9fdf-b97mc:/autokuma/static-monitors# ls -lah
total 12K
drwxrwxrwx 3 root root 4.0K Aug 26 08:07 .
drwxr-xr-x 3 root root 4.0K Aug 26 08:07 ..
drwxr-xr-x 2 root root 4.0K Aug 26 08:07 ..2024_08_26_08_07_18.3501614066
lrwxrwxrwx 1 root root   32 Aug 26 08:07 ..data -> ..2024_08_26_08_07_18.3501614066
lrwxrwxrwx 1 root root   19 Aug 26 08:07 example.json -> ..data/example.json

results in:

WARN [autokuma::sync] Encountered error during sync: Unable to deserialize: Unsupported static monitor file type: /autokuma/static-monitors/..2024_08_26_08_07_18.3501614066, supported: .json, .toml

This has been fixed on master, please note that the master currently contains some breaking change so make sure to read the CHANGELOG if you want to test the feature.