splunk / addonfactory-ucc-generator

A framework to generate UI-based Splunk Add-ons.
https://splunk.github.io/addonfactory-ucc-generator/
Apache License 2.0
59 stars 21 forks source link

BUG: interval validation should support Cron in addition to integers #1324

Open inspired opened 1 month ago

inspired commented 1 month ago

Description

The custom validator I have defined in globalConfig.json for interval is being overridden by a validator that only supports integers:

fields = [ field.RestField( 'interval', required=True, encrypted=False, default=None, validator=validator.Pattern( regex=r"""^\-[1-9]\d*$|^\d*$""", ) ),

Error message: Schedule must be either a non-negative number or -1.

inputs.conf allows for interval = [<decimal>|<cron schedule>] and this has worked in previous versions of UCC.

What UCC version are you using?

splunk-add-on-ucc-framework==5.49.0

Additional System Info

Python 3.9

artemrys commented 3 weeks ago

Created a https://splunk.atlassian.net/browse/ADDON-73348 for it.