diff --git a/scripts/build_aws_lambda_layer.py b/scripts/build_aws_lambda_layer.py index fce67080de..af85b8b96d 100644 --- a/scripts/build_aws_lambda_layer.py +++ b/scripts/build_aws_lambda_layer.py @@ -18,7 +18,7 @@ class LayerBuilder: def __init__( self, base_dir: str, - out_zip_filename: "Optional[str]"=None, + out_zip_filename: "Optional[str]" = None, ) -> None: self.base_dir = base_dir self.python_site_packages = os.path.join(self.base_dir, PYTHON_SITE_PACKAGES) diff --git a/sentry_sdk/_types.py b/sentry_sdk/_types.py index e5f791fdf0..dad2e8c517 100644 --- a/sentry_sdk/_types.py +++ b/sentry_sdk/_types.py @@ -351,6 +351,7 @@ class SDKInfo(TypedDict): "max_runtime": int, "failure_issue_threshold": int, "recovery_threshold": int, + "owner": str, }, total=False, ) diff --git a/tests/test_crons.py b/tests/test_crons.py index 493cc44272..8bd4d8b1ff 100644 --- a/tests/test_crons.py +++ b/tests/test_crons.py @@ -262,6 +262,22 @@ def test_monitor_config(sentry_init, capture_envelopes): assert "monitor_config" not in check_in +def test_monitor_config_with_owner(sentry_init, capture_envelopes): + sentry_init() + envelopes = capture_envelopes() + + monitor_config = { + "schedule": {"type": "crontab", "value": "0 0 * * *"}, + "owner": "team:6", + } + + capture_checkin(monitor_slug="abc123", monitor_config=monitor_config) + check_in = envelopes[0].items[0].payload.json + + assert check_in["monitor_slug"] == "abc123" + assert check_in["monitor_config"]["owner"] == "team:6" + + def test_decorator_monitor_config(sentry_init, capture_envelopes): sentry_init() envelopes = capture_envelopes()