Validate that trigger configurations must include a file pattern.#7702
Validate that trigger configurations must include a file pattern.#7702labkey-klum wants to merge 6 commits into
Conversation
… could result in orphaned listeners. Add unit tests.
cnathe
left a comment
There was a problem hiding this comment.
Code changes look note.
Note: you may have already seen this on TC but I ran the FileWatcherAssayIntegrationTest.testAssayProviderProtocol() test case locally and it failed because it doesn't have the now required "filePattern" when calling createFileWatcherTrigger() at line 71.
|
@labkey-klum @labkey-mohara reminder that when this is merged we will also want to be sure to update the "File Pattern" text in this doc page to remove the part about "if no pattern is provided, the default pattern is used": |
thanks Cory |
Rationale
related issue: https://github.com/LabKey/internal-issues/issues/1093
The current pipeline trigger UI will allow the creation of a trigger with a blank file regex. This is bad because it results in a configuration that matches anything in the watched location(s). This includes artifacts generated by the pipeline tasks such as .log files and pipeline protocol information stored in the
.labkeysystem directory. When this happens the configuration will continue to trigger itself endlessly and fill up the quiet period queue with jobs for each newly created file.The only way to stop this is to disable or delete the trigger, but then the in-memory queue will continue to add new pipeline jobs until it is eventually drained (unless the server is restarted prior to that).
Related Pull Requests
Changes
Mark the file pattern field as required for pipeline trigger configurations. Also add a server side check.