Conversation
Use fsnotify/inotify to watch the model path for file changes and trigger re-validation immediately, instead of waiting for the next polling interval. The interval-based ticker remains as a fallback for network filesystems (NFS, CIFS) where inotify cannot observe remote writes. Adds --watch flag to validation-agent, Watch field to ContinuousValidation CRD, and watcher package with recursive directory watching and debounce. Resolves: SECURESIGN-3615 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Nina Bongartz <pninak@web.de>
5833601 to
8681af7
Compare
|
please have a look too. @ompushkara @sampras343 😃 |
| }) | ||
| } | ||
|
|
||
| func (w *Watcher) addRecursive(fsw *fsnotify.Watcher, root string) error { |
There was a problem hiding this comment.
@miyunari ,Overall looks good . Just few : addRecursive only registers directories. When spec.model.path points to a file—supported by the existing API and tests—filepath.WalkDir visits the file but adds no watch. Run succeeds and logs that it is watching, but no file events are ever delivered.
|
@miyunari , Please regenerate and commit config/crd/bases/ml.sigstore.dev_modelvalidations.yaml; otherwise the new watch field is not accepted/persisted by the deployed CRD. |
| defer fsw.Close() | ||
| defer close(ch) |
There was a problem hiding this comment.
Potential bug: Send on closed channel panic during shutdown
Consider stopping the timer before closing the channel.
sampras343
left a comment
There was a problem hiding this comment.
Regenerate the CRD manifests
Summary
fsnotify-based file watcher to the validation agent that triggers model re-validation immediately when files on the PVC change (create/write/remove/rename), instead of waiting for the next polling interval--watchflag to thevalidation-agentbinary andwatchfield to theContinuousValidationCRD spec--intervalpolling ticker remains as a safety net for network filesystems (NFS, CIFS) where inotify cannot observe remote writesSupported storage backends
Not supported (use interval fallback)
Resolves: SECURESIGN-3615
Test plan
🤖 Generated with Claude Code