From 3a5f865ea6b7e6c9b7e3a9a506a3e132b5ab4f10 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:19:06 +0000 Subject: [PATCH] Remove groupby_simple_monitor (#2203) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +++---- .../v1/monitors/ValidateExistingMonitor.py | 1 - examples/v1/monitors/ValidateMonitor.py | 1 - .../v1/monitors/ValidateMonitor_4247196452.py | 1 - ...idate_a_monitor_returns_ok_response.frozen | 2 +- ...alidate_a_monitor_returns_ok_response.yaml | 6 ++--- ...tialert_monitor_returns_ok_response.frozen | 2 +- ...ultialert_monitor_returns_ok_response.yaml | 6 ++--- ...xisting_monitor_returns_ok_response.frozen | 2 +- ..._existing_monitor_returns_ok_response.yaml | 24 +++++++++---------- tests/v1/features/monitor_payload.json | 1 - .../features/multi_alert_monitor_payload.json | 1 - 12 files changed, 25 insertions(+), 30 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index fd382ec1cd..918a01fbed 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-09 13:48:31.125396", - "spec_repo_commit": "a458c3a4" + "regenerated": "2024-10-09 15:03:03.678250", + "spec_repo_commit": "43ae024c" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-09 13:48:31.266147", - "spec_repo_commit": "a458c3a4" + "regenerated": "2024-10-09 15:03:03.695757", + "spec_repo_commit": "43ae024c" } } } \ No newline at end of file diff --git a/examples/v1/monitors/ValidateExistingMonitor.py b/examples/v1/monitors/ValidateExistingMonitor.py index 5943d552cd..07d0a1c692 100644 --- a/examples/v1/monitors/ValidateExistingMonitor.py +++ b/examples/v1/monitors/ValidateExistingMonitor.py @@ -29,7 +29,6 @@ enable_logs_sample=True, escalation_message="the situation has escalated", evaluation_delay=700, - groupby_simple_monitor=True, include_tags=True, locked=False, new_host_delay=600, diff --git a/examples/v1/monitors/ValidateMonitor.py b/examples/v1/monitors/ValidateMonitor.py index 3de65a5b4e..3384f7494a 100644 --- a/examples/v1/monitors/ValidateMonitor.py +++ b/examples/v1/monitors/ValidateMonitor.py @@ -25,7 +25,6 @@ enable_logs_sample=True, escalation_message="the situation has escalated", evaluation_delay=700, - groupby_simple_monitor=True, include_tags=True, locked=False, new_host_delay=600, diff --git a/examples/v1/monitors/ValidateMonitor_4247196452.py b/examples/v1/monitors/ValidateMonitor_4247196452.py index 10d0180af8..151e6420f4 100644 --- a/examples/v1/monitors/ValidateMonitor_4247196452.py +++ b/examples/v1/monitors/ValidateMonitor_4247196452.py @@ -25,7 +25,6 @@ escalation_message="the situation has escalated", evaluation_delay=700, group_retention_duration="2d", - groupby_simple_monitor=False, include_tags=True, locked=False, new_host_delay=600, diff --git a/tests/v1/cassettes/test_scenarios/test_validate_a_monitor_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_validate_a_monitor_returns_ok_response.frozen index ba44339836..c010310b32 100644 --- a/tests/v1/cassettes/test_scenarios/test_validate_a_monitor_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_validate_a_monitor_returns_ok_response.frozen @@ -1 +1 @@ -2023-01-18T18:30:59.296Z \ No newline at end of file +2024-10-09T14:54:54.858Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_validate_a_monitor_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_validate_a_monitor_returns_ok_response.yaml index 916ea6d07b..182c9d3702 100644 --- a/tests/v1/cassettes/test_scenarios/test_validate_a_monitor_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_validate_a_monitor_returns_ok_response.yaml @@ -1,9 +1,9 @@ interactions: - request: - body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Validate_a_monitor_returns_OK_response-1674066659","options":{"enable_logs_sample":true,"escalation_message":"the - situation has escalated","evaluation_delay":700,"groupby_simple_monitor":true,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notification_preset_name":"hide_handles","notify_audit":false,"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo + body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Validate_a_monitor_returns_OK_response-1728485694","options":{"enable_logs_sample":true,"escalation_message":"the + situation has escalated","evaluation_delay":700,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notification_preset_name":"hide_handles","notify_audit":false,"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") - > 2","tags":["test:testvalidateamonitorreturnsokresponse1674066659","env:ci"],"type":"log + > 2","tags":["test:testvalidateamonitorreturnsokresponse1728485694","env:ci"],"type":"log alert"}' headers: accept: diff --git a/tests/v1/cassettes/test_scenarios/test_validate_a_multialert_monitor_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_validate_a_multialert_monitor_returns_ok_response.frozen index d48e3459d6..3569fa0eb8 100644 --- a/tests/v1/cassettes/test_scenarios/test_validate_a_multialert_monitor_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_validate_a_multialert_monitor_returns_ok_response.frozen @@ -1 +1 @@ -2022-09-30T16:41:33.797Z \ No newline at end of file +2024-10-09T14:54:55.290Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_validate_a_multialert_monitor_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_validate_a_multialert_monitor_returns_ok_response.yaml index 13a6b2fa0c..6e86a0850a 100644 --- a/tests/v1/cassettes/test_scenarios/test_validate_a_multialert_monitor_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_validate_a_multialert_monitor_returns_ok_response.yaml @@ -1,9 +1,9 @@ interactions: - request: - body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Validate_a_multi_alert_monitor_returns_OK_response-1664556093","options":{"enable_logs_sample":true,"escalation_message":"the - situation has escalated","evaluation_delay":700,"group_retention_duration":"2d","groupby_simple_monitor":false,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notify_audit":false,"notify_by":["status"],"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo + body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Validate_a_multi_alert_monitor_returns_OK_response-1728485695","options":{"enable_logs_sample":true,"escalation_message":"the + situation has escalated","evaluation_delay":700,"group_retention_duration":"2d","include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notify_audit":false,"notify_by":["status"],"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source,status\").last(\"5m\") - > 2","tags":["test:testvalidateamultialertmonitorreturnsokresponse1664556093","env:ci"],"type":"log + > 2","tags":["test:testvalidateamultialertmonitorreturnsokresponse1728485695","env:ci"],"type":"log alert"}' headers: accept: diff --git a/tests/v1/cassettes/test_scenarios/test_validate_an_existing_monitor_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_validate_an_existing_monitor_returns_ok_response.frozen index 472fcff749..dc14445dd3 100644 --- a/tests/v1/cassettes/test_scenarios/test_validate_an_existing_monitor_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_validate_an_existing_monitor_returns_ok_response.frozen @@ -1 +1 @@ -2023-01-18T18:37:20.511Z \ No newline at end of file +2024-10-09T14:54:55.436Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_validate_an_existing_monitor_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_validate_an_existing_monitor_returns_ok_response.yaml index 698804487b..3140b49035 100644 --- a/tests/v1/cassettes/test_scenarios/test_validate_an_existing_monitor_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_validate_an_existing_monitor_returns_ok_response.yaml @@ -1,9 +1,9 @@ interactions: - request: - body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Validate_an_existing_monitor_returns_OK_response-1674067040","options":{"enable_logs_sample":true,"escalation_message":"the + body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Validate_an_existing_monitor_returns_OK_response-1728485695","options":{"enable_logs_sample":true,"escalation_message":"the situation has escalated","evaluation_delay":700,"groupby_simple_monitor":true,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notification_preset_name":"hide_handles","notify_audit":false,"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") - > 2","tags":["test:testvalidateanexistingmonitorreturnsokresponse1674067040","env:ci"],"type":"log + > 2","tags":["test:testvalidateanexistingmonitorreturnsokresponse1728485695","env:ci"],"type":"log alert"}' headers: accept: @@ -14,12 +14,12 @@ interactions: uri: https://api.datadoghq.com/api/v1/monitor response: body: - string: '{"id":108260307,"org_id":321813,"type":"log alert","name":"Test-Validate_an_existing_monitor_returns_OK_response-1674067040","message":"some - message Notify: @hipchat-channel","tags":["test:testvalidateanexistingmonitorreturnsokresponse1674067040","env:ci"],"query":"logs(\"service:foo + string: '{"id":155758542,"org_id":321813,"type":"log alert","name":"Test-Validate_an_existing_monitor_returns_OK_response-1728485695","message":"some + message Notify: @hipchat-channel","tags":["test:testvalidateanexistingmonitorreturnsokresponse1728485695","env:ci"],"query":"logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") > 2","options":{"enable_logs_sample":true,"escalation_message":"the situation - has escalated","evaluation_delay":700,"groupby_simple_monitor":true,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notification_preset_name":"hide_handles","notify_audit":false,"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2.0,"warning":1.0},"timeout_h":24,"silenced":{}},"multi":true,"created_at":1674067040000,"created":"2023-01-18T18:37:20.717952+00:00","modified":"2023-01-18T18:37:20.717952+00:00","deleted":null,"restricted_roles":null,"priority":3,"overall_state_modified":null,"overall_state":"No - Data","creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com","id":1445416}} + has escalated","evaluation_delay":700,"groupby_simple_monitor":true,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notification_preset_name":"hide_handles","notify_audit":false,"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2.0,"warning":1.0},"timeout_h":24,"silenced":{}},"multi":true,"created_at":1728485695000,"created":"2024-10-09T14:54:55.594487+00:00","modified":"2024-10-09T14:54:55.594487+00:00","deleted":null,"restricted_roles":null,"priority":3,"restriction_policy":null,"overall_state_modified":null,"overall_state":"No + Data","creator":{"name":"Anika Maskara","handle":"anika.maskara@datadoghq.com","email":"anika.maskara@datadoghq.com","id":7557262}} ' headers: @@ -29,10 +29,10 @@ interactions: code: 200 message: OK - request: - body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Validate_an_existing_monitor_returns_OK_response-1674067040","options":{"enable_logs_sample":true,"escalation_message":"the - situation has escalated","evaluation_delay":700,"groupby_simple_monitor":true,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notification_preset_name":"hide_handles","notify_audit":false,"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo + body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Validate_an_existing_monitor_returns_OK_response-1728485695","options":{"enable_logs_sample":true,"escalation_message":"the + situation has escalated","evaluation_delay":700,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notification_preset_name":"hide_handles","notify_audit":false,"notify_no_data":false,"on_missing_data":"show_and_notify_no_data","renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") - > 2","tags":["test:testvalidateanexistingmonitorreturnsokresponse1674067040","env:ci"],"type":"log + > 2","tags":["test:testvalidateanexistingmonitorreturnsokresponse1728485695","env:ci"],"type":"log alert"}' headers: accept: @@ -40,7 +40,7 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v1/monitor/108260307/validate + uri: https://api.datadoghq.com/api/v1/monitor/155758542/validate response: body: string: '{} @@ -58,10 +58,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/monitor/108260307 + uri: https://api.datadoghq.com/api/v1/monitor/155758542 response: body: - string: '{"deleted_monitor_id":108260307} + string: '{"deleted_monitor_id":155758542} ' headers: diff --git a/tests/v1/features/monitor_payload.json b/tests/v1/features/monitor_payload.json index f17fbd01f8..f69d62b77d 100644 --- a/tests/v1/features/monitor_payload.json +++ b/tests/v1/features/monitor_payload.json @@ -9,7 +9,6 @@ "enable_logs_sample": true, "escalation_message": "the situation has escalated", "evaluation_delay": 700, - "groupby_simple_monitor": true, "include_tags": true, "locked": false, "new_host_delay": 600, diff --git a/tests/v1/features/multi_alert_monitor_payload.json b/tests/v1/features/multi_alert_monitor_payload.json index a0eb80488e..960530c276 100644 --- a/tests/v1/features/multi_alert_monitor_payload.json +++ b/tests/v1/features/multi_alert_monitor_payload.json @@ -10,7 +10,6 @@ "escalation_message": "the situation has escalated", "evaluation_delay": 700, "group_retention_duration": "2d", - "groupby_simple_monitor": false, "include_tags": true, "locked": false, "new_host_delay": 600,