Description
Hello,
I added the serial metric in #113 and then I saw that it was continuously increasing.
In the logs, I see that the objects are not updated:
time="2024-02-27T14:53:15Z" level=info msg="HTTP 304 Not modified for http://rpki-validator-rpki-client/objects/validated"
time="2024-02-27T14:53:16Z" level=info msg="New update (517256 uniques, 517256 total prefixes, 51 vaps, 2 router keys)."
However, I also see that a new "update" is triggered.
I have a static slurm.json
file provided as a local path in the container (via -slurm /slurm.json
option), and it's never updated.
I think the serial should only be updated if the vrps are updated or the slurm is changed, and that seems to be what the code want's to do as well:
// Only process the first time after there is either a cache or SLURM
// update.
if cacheUpdated || slurmNotPresentOrUpdated {
So I think there is unexpected behavior in :
slurmNotPresentOrUpdated, err = s.updateSlurm(slurmFile)
Maybe the FetchConfig
could maintain a hash of the file (when it's a local file) to see if it has been modified (emulate etag behavior for local files) ?
Or maybe it should be in the state
object ?
I you provide guidance I am happy to implement :)