diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9041f8a003..ba55aa7a1b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -90580,9 +90580,6 @@ paths: operator: OR permissions: - test_optimization_settings_write - x-unstable: |- - **Note**: This endpoint is in preview and may be subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: |- Retrieve Flaky Tests Management repository-level policies for the given repository. @@ -90627,9 +90624,6 @@ paths: operator: OR permissions: - test_optimization_read - x-unstable: |- - **Note**: This endpoint is in preview and may be subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/ci/test-optimization/settings/service: delete: description: |- @@ -90673,9 +90667,6 @@ paths: operator: OR permissions: - test_optimization_settings_write - x-unstable: |- - **Note**: This endpoint is in preview and may be subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: description: |- Partially update Test Optimization settings for a specific service identified by repository, service name, and environment. @@ -90729,9 +90720,6 @@ paths: operator: OR permissions: - test_optimization_settings_write - x-unstable: |- - **Note**: This endpoint is in preview and may be subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: |- Retrieve Test Optimization settings for a specific service identified by repository, service name, and environment. @@ -90778,9 +90766,6 @@ paths: operator: OR permissions: - test_optimization_read - x-unstable: |- - **Note**: This endpoint is in preview and may be subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/ci/tests/analytics/aggregate: post: description: |- @@ -132177,9 +132162,6 @@ paths: operator: OR permissions: - test_optimization_write - x-unstable: |- - **Note**: This endpoint is in preview and may be subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: |- List endpoint returning flaky tests from Flaky Test Management. Results are paginated. @@ -132246,9 +132228,6 @@ paths: operator: OR permissions: - test_optimization_read - x-unstable: |- - **Note**: This endpoint is in preview and may be subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/usage/application_security: get: deprecated: true diff --git a/examples/v2/test-optimization/DeleteTestOptimizationServiceSettings.py b/examples/v2/test-optimization/DeleteTestOptimizationServiceSettings.py index 5727e61903..8a28fb9390 100644 --- a/examples/v2/test-optimization/DeleteTestOptimizationServiceSettings.py +++ b/examples/v2/test-optimization/DeleteTestOptimizationServiceSettings.py @@ -29,7 +29,6 @@ ) configuration = Configuration() -configuration.unstable_operations["delete_test_optimization_service_settings"] = True with ApiClient(configuration) as api_client: api_instance = TestOptimizationApi(api_client) api_instance.delete_test_optimization_service_settings(body=body) diff --git a/examples/v2/test-optimization/GetFlakyTestsManagementPolicies.py b/examples/v2/test-optimization/GetFlakyTestsManagementPolicies.py index e210e31dde..05eeb2cd24 100644 --- a/examples/v2/test-optimization/GetFlakyTestsManagementPolicies.py +++ b/examples/v2/test-optimization/GetFlakyTestsManagementPolicies.py @@ -27,7 +27,6 @@ ) configuration = Configuration() -configuration.unstable_operations["get_flaky_tests_management_policies"] = True with ApiClient(configuration) as api_client: api_instance = TestOptimizationApi(api_client) response = api_instance.get_flaky_tests_management_policies(body=body) diff --git a/examples/v2/test-optimization/GetTestOptimizationServiceSettings.py b/examples/v2/test-optimization/GetTestOptimizationServiceSettings.py index 9f5cace4a6..5bda037b6d 100644 --- a/examples/v2/test-optimization/GetTestOptimizationServiceSettings.py +++ b/examples/v2/test-optimization/GetTestOptimizationServiceSettings.py @@ -29,7 +29,6 @@ ) configuration = Configuration() -configuration.unstable_operations["get_test_optimization_service_settings"] = True with ApiClient(configuration) as api_client: api_instance = TestOptimizationApi(api_client) response = api_instance.get_test_optimization_service_settings(body=body) diff --git a/examples/v2/test-optimization/SearchFlakyTests.py b/examples/v2/test-optimization/SearchFlakyTests.py index 4911424fda..794fa4b41c 100644 --- a/examples/v2/test-optimization/SearchFlakyTests.py +++ b/examples/v2/test-optimization/SearchFlakyTests.py @@ -30,7 +30,6 @@ ) configuration = Configuration() -configuration.unstable_operations["search_flaky_tests"] = True with ApiClient(configuration) as api_client: api_instance = TestOptimizationApi(api_client) response = api_instance.search_flaky_tests(body=body) diff --git a/examples/v2/test-optimization/SearchFlakyTests_1224086727.py b/examples/v2/test-optimization/SearchFlakyTests_1224086727.py index dba5c0e048..00174c5f55 100644 --- a/examples/v2/test-optimization/SearchFlakyTests_1224086727.py +++ b/examples/v2/test-optimization/SearchFlakyTests_1224086727.py @@ -30,7 +30,6 @@ ) configuration = Configuration() -configuration.unstable_operations["search_flaky_tests"] = True with ApiClient(configuration) as api_client: api_instance = TestOptimizationApi(api_client) items = api_instance.search_flaky_tests_with_pagination(body=body) diff --git a/examples/v2/test-optimization/UpdateFlakyTests.py b/examples/v2/test-optimization/UpdateFlakyTests.py index 6ee67e61d3..75454539b5 100644 --- a/examples/v2/test-optimization/UpdateFlakyTests.py +++ b/examples/v2/test-optimization/UpdateFlakyTests.py @@ -26,7 +26,6 @@ ) configuration = Configuration() -configuration.unstable_operations["update_flaky_tests"] = True with ApiClient(configuration) as api_client: api_instance = TestOptimizationApi(api_client) response = api_instance.update_flaky_tests(body=body) diff --git a/examples/v2/test-optimization/UpdateFlakyTestsManagementPolicies.py b/examples/v2/test-optimization/UpdateFlakyTestsManagementPolicies.py index 1e8312f982..144f308519 100644 --- a/examples/v2/test-optimization/UpdateFlakyTestsManagementPolicies.py +++ b/examples/v2/test-optimization/UpdateFlakyTestsManagementPolicies.py @@ -103,7 +103,6 @@ ) configuration = Configuration() -configuration.unstable_operations["update_flaky_tests_management_policies"] = True with ApiClient(configuration) as api_client: api_instance = TestOptimizationApi(api_client) response = api_instance.update_flaky_tests_management_policies(body=body) diff --git a/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.py b/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.py index 385fecf5b5..d7badb31b6 100644 --- a/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.py +++ b/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.py @@ -35,7 +35,6 @@ ) configuration = Configuration() -configuration.unstable_operations["update_test_optimization_service_settings"] = True with ApiClient(configuration) as api_client: api_instance = TestOptimizationApi(api_client) response = api_instance.update_test_optimization_service_settings(body=body) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 104762de45..820b5fc6b4 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -314,13 +314,6 @@ def __init__( "v2.get_change_request": False, "v2.update_change_request": False, "v2.update_change_request_decision": False, - "v2.delete_test_optimization_service_settings": False, - "v2.get_flaky_tests_management_policies": False, - "v2.get_test_optimization_service_settings": False, - "v2.search_flaky_tests": False, - "v2.update_flaky_tests": False, - "v2.update_flaky_tests_management_policies": False, - "v2.update_test_optimization_service_settings": False, "v2.create_aws_cloud_auth_persona_mapping": False, "v2.delete_aws_cloud_auth_persona_mapping": False, "v2.get_aws_cloud_auth_persona_mapping": False, diff --git a/tests/v2/features/test_optimization.feature b/tests/v2/features/test_optimization.feature index 8838a4998e..c363d29f04 100644 --- a/tests/v2/features/test_optimization.feature +++ b/tests/v2/features/test_optimization.feature @@ -11,48 +11,42 @@ Feature: Test Optimization @generated @skip @team:DataDog/ci-app-backend Scenario: Delete Test Optimization service settings returns "Bad Request" response - Given operation "DeleteTestOptimizationServiceSettings" enabled - And new "DeleteTestOptimizationServiceSettings" request + Given new "DeleteTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_delete_service_settings_request"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Delete Test Optimization service settings returns "No Content" response - Given operation "DeleteTestOptimizationServiceSettings" enabled - And new "DeleteTestOptimizationServiceSettings" request + Given new "DeleteTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_delete_service_settings_request"}} When the request is sent Then the response status is 204 No Content @generated @skip @team:DataDog/ci-app-backend Scenario: Delete Test Optimization service settings returns "Not Found" response - Given operation "DeleteTestOptimizationServiceSettings" enabled - And new "DeleteTestOptimizationServiceSettings" request + Given new "DeleteTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_delete_service_settings_request"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/ci-app-backend Scenario: Get Flaky Tests Management policies returns "Bad Request" response - Given operation "GetFlakyTestsManagementPolicies" enabled - And new "GetFlakyTestsManagementPolicies" request + Given new "GetFlakyTestsManagementPolicies" request And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Get Flaky Tests Management policies returns "Not Found" response - Given operation "GetFlakyTestsManagementPolicies" enabled - And new "GetFlakyTestsManagementPolicies" request + Given new "GetFlakyTestsManagementPolicies" request And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/ci-app-backend Scenario: Get Flaky Tests Management policies returns "OK" response - Given operation "GetFlakyTestsManagementPolicies" enabled - And new "GetFlakyTestsManagementPolicies" request + Given new "GetFlakyTestsManagementPolicies" request And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}} When the request is sent Then the response status is 200 OK @@ -67,24 +61,21 @@ Feature: Test Optimization @generated @skip @team:DataDog/ci-app-backend Scenario: Get Test Optimization service settings returns "Bad Request" response - Given operation "GetTestOptimizationServiceSettings" enabled - And new "GetTestOptimizationServiceSettings" request + Given new "GetTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_get_service_settings_request"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Get Test Optimization service settings returns "Not Found" response - Given operation "GetTestOptimizationServiceSettings" enabled - And new "GetTestOptimizationServiceSettings" request + Given new "GetTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_get_service_settings_request"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/ci-app-backend Scenario: Get Test Optimization service settings returns "OK" response - Given operation "GetTestOptimizationServiceSettings" enabled - And new "GetTestOptimizationServiceSettings" request + Given new "GetTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_get_service_settings_request"}} When the request is sent Then the response status is 200 OK @@ -115,8 +106,7 @@ Feature: Test Optimization @generated @skip @team:DataDog/ci-app-backend Scenario: Search flaky tests returns "Bad Request" response - Given operation "SearchFlakyTests" enabled - And new "SearchFlakyTests" request + Given new "SearchFlakyTests" request And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}} When the request is sent Then the response status is 400 Bad Request @@ -131,8 +121,7 @@ Feature: Test Optimization @generated @skip @team:DataDog/ci-app-backend Scenario: Search flaky tests returns "OK" response - Given operation "SearchFlakyTests" enabled - And new "SearchFlakyTests" request + Given new "SearchFlakyTests" request And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}} When the request is sent Then the response status is 200 OK @@ -161,32 +150,28 @@ Feature: Test Optimization @generated @skip @team:DataDog/ci-app-backend @with-pagination Scenario: Search flaky tests returns "OK" response with pagination - Given operation "SearchFlakyTests" enabled - And new "SearchFlakyTests" request + Given new "SearchFlakyTests" request And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}} When the request with pagination is sent Then the response status is 200 OK @generated @skip @team:DataDog/ci-app-backend Scenario: Update Flaky Tests Management policies returns "Bad Request" response - Given operation "UpdateFlakyTestsManagementPolicies" enabled - And new "UpdateFlakyTestsManagementPolicies" request + Given new "UpdateFlakyTestsManagementPolicies" request And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Update Flaky Tests Management policies returns "Not Found" response - Given operation "UpdateFlakyTestsManagementPolicies" enabled - And new "UpdateFlakyTestsManagementPolicies" request + Given new "UpdateFlakyTestsManagementPolicies" request And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/ci-app-backend Scenario: Update Flaky Tests Management policies returns "OK" response - Given operation "UpdateFlakyTestsManagementPolicies" enabled - And new "UpdateFlakyTestsManagementPolicies" request + Given new "UpdateFlakyTestsManagementPolicies" request And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}} When the request is sent Then the response status is 200 OK @@ -201,24 +186,21 @@ Feature: Test Optimization @generated @skip @team:DataDog/ci-app-backend Scenario: Update Test Optimization service settings returns "Bad Request" response - Given operation "UpdateTestOptimizationServiceSettings" enabled - And new "UpdateTestOptimizationServiceSettings" request + Given new "UpdateTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Update Test Optimization service settings returns "Not Found" response - Given operation "UpdateTestOptimizationServiceSettings" enabled - And new "UpdateTestOptimizationServiceSettings" request + Given new "UpdateTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/ci-app-backend Scenario: Update Test Optimization service settings returns "OK" response - Given operation "UpdateTestOptimizationServiceSettings" enabled - And new "UpdateTestOptimizationServiceSettings" request + Given new "UpdateTestOptimizationServiceSettings" request And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}} When the request is sent Then the response status is 200 OK @@ -233,16 +215,14 @@ Feature: Test Optimization @generated @skip @team:DataDog/ci-app-backend Scenario: Update flaky test states returns "Bad Request" response - Given operation "UpdateFlakyTests" enabled - And new "UpdateFlakyTests" request + Given new "UpdateFlakyTests" request And body with value {"data": {"attributes": {"tests": [{"id": "4eb1887a8adb1847", "new_state": "active"}]}, "type": "update_flaky_test_state_request"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Update flaky test states returns "OK" response - Given operation "UpdateFlakyTests" enabled - And new "UpdateFlakyTests" request + Given new "UpdateFlakyTests" request And body with value {"data": {"attributes": {"tests": [{"id": "4eb1887a8adb1847", "new_state": "active"}]}, "type": "update_flaky_test_state_request"}} When the request is sent Then the response status is 200 OK