You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/18 21:59:42 UTC

[GitHub] [superset] riahk commented on a change in pull request #12926: fix: add alert report timeout limits

riahk commented on a change in pull request #12926:
URL: https://github.com/apache/superset/pull/12926#discussion_r578774239



##########
File path: superset/reports/schemas.py
##########
@@ -158,14 +159,22 @@ class ReportSchedulePostSchema(Schema):
         ),
     )
     validator_config_json = fields.Nested(ValidatorConfigJSONSchema)
-    log_retention = fields.Integer(description=log_retention_description, example=90)
+    log_retention = fields.Integer(
+        description=log_retention_description,
+        example=90,
+        validate=[Range(min=1, error=_("Value must be greater than 0"))],
+    )
     grace_period = fields.Integer(
-        description=grace_period_description, example=60 * 60 * 4, default=60 * 60 * 4
+        description=grace_period_description,
+        example=60 * 60 * 4,
+        default=60 * 60 * 4,
+        validate=[Range(min=1, error=_("Value must be greater than 0"))],

Review comment:
       I may be mistaken, but I'm pretty sure we use this schema for both alerts and reports.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org