Browse Source

fix(crons): Allow additional properties (#54602)

Allows additional properties on config
Richard Ortenberg 1 year ago
parent
commit
d559921473
2 changed files with 6 additions and 5 deletions
  1. 1 1
      src/sentry/monitors/models.py
  2. 5 4
      tests/sentry/monitors/test_models.py

+ 1 - 1
src/sentry/monitors/models.py

@@ -65,7 +65,7 @@ MONITOR_CONFIG = {
     },
     # TODO(davidenwang): Old monitors may not have timezone or schedule_type, these should be added here once we've cleaned up old data
     "required": ["checkin_margin", "max_runtime", "schedule"],
-    "additionalProperties": False,
+    "additionalProperties": True,
 }
 
 MAX_SLUG_LENGTH = 50

+ 5 - 4
tests/sentry/monitors/test_models.py

@@ -645,7 +645,8 @@ class MonitorEnvironmentTestCase(TestCase):
         validated_config = monitor.get_validated_config()
         assert validated_config is not None
 
-        # Check to make sure bad config fails validation
-        validated_config["bad_key"] = 100
-        monitor.config = validated_config
-        assert monitor.get_validated_config() is None
+        # (rjo100): Commenting out temporarily
+        # # Check to make sure bad config fails validation
+        # validated_config["bad_key"] = 100
+        # monitor.config = validated_config
+        # assert monitor.get_validated_config() is None