watcher dashboard: Oneshot Audit Create failed
Bug #1783683 reported by
YumengBao
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
watcher |
Fix Released
|
High
|
YumengBao |
Bug Description
When using Watcher dashboard to create an audit, the following situation occurs:
We fail to create a ONESHOT audit with Dummy Goal and Dummy Strategy, however a CONTUNIOUS audit with Dummy Goal and Dummy Strategy and 90 seconds intervals can be successfully created.
Changed in watcher: | |
importance: | Undecided → High |
assignee: | nobody → YumengBao (yumeng-bao) |
milestone: | none → rocky-rc |
status: | New → In Progress |
summary: |
- Oneshot Audit Create failed + watcher dashboard: Oneshot Audit Create failed |
To post a comment you must log in.
The problem is caused by the "Interval " in the CreateForm, where Interval (in seconds or cron format) was a compulsory parameter no matter what audit_type it is.
In fact, the situation should be when the audit_type is ONESHOT, it is unnecessary to have Interval.
when the audit_type is CONTINUOUS, "Interval" parameter is required.
So here, the solution is: set the Interval parameter to required=False, and check if the parameter is null when audit_type is CONTINUOUS.