Skip to content

Commit 2d277d0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit e639938 of spec repo (#3497)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent d04f1e2 commit 2d277d0

7 files changed

Lines changed: 201 additions & 44 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 73 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -102910,14 +102910,26 @@ components:
102910102910
description: Whether Auto Test Retries are enabled for this service.
102911102911
example: false
102912102912
type: boolean
102913+
auto_test_retries_enabled_is_overridden:
102914+
description: Whether the Auto Test Retries setting is overridden at the service level.
102915+
example: false
102916+
type: boolean
102913102917
code_coverage_enabled:
102914102918
description: Whether Code Coverage is enabled for this service.
102915102919
example: false
102916102920
type: boolean
102921+
code_coverage_enabled_is_overridden:
102922+
description: Whether the Code Coverage setting is overridden at the service level.
102923+
example: false
102924+
type: boolean
102917102925
early_flake_detection_enabled:
102918102926
description: Whether Early Flake Detection is enabled for this service.
102919102927
example: false
102920102928
type: boolean
102929+
early_flake_detection_enabled_is_overridden:
102930+
description: Whether the Early Flake Detection setting is overridden at the service level.
102931+
example: false
102932+
type: boolean
102921102933
env:
102922102934
description: The environment name.
102923102935
example: prod
@@ -102926,9 +102938,13 @@ components:
102926102938
description: Whether Failed Test Replay is enabled for this service.
102927102939
example: false
102928102940
type: boolean
102941+
failed_test_replay_enabled_is_overridden:
102942+
description: Whether the Failed Test Replay setting is overridden at the service level.
102943+
example: false
102944+
type: boolean
102929102945
pr_comments_enabled:
102930-
description: Whether PR Comments are enabled for this service.
102931-
example: true
102946+
description: Whether PR Comments are enabled. This value reflects the repository-level setting and cannot be overridden at the service level.
102947+
example: false
102932102948
type: boolean
102933102949
repository_id:
102934102950
description: The repository identifier.
@@ -102940,7 +102956,11 @@ components:
102940102956
type: string
102941102957
test_impact_analysis_enabled:
102942102958
description: Whether Test Impact Analysis is enabled for this service.
102943-
example: false
102959+
example: true
102960+
type: boolean
102961+
test_impact_analysis_enabled_is_overridden:
102962+
description: Whether the Test Impact Analysis setting is overridden at the service level.
102963+
example: true
102944102964
type: boolean
102945102965
type: object
102946102966
TestOptimizationServiceSettingsData:
@@ -102950,7 +102970,7 @@ components:
102950102970
$ref: "#/components/schemas/TestOptimizationServiceSettingsAttributes"
102951102971
id:
102952102972
description: Unique identifier for the service settings.
102953-
example: github.com/datadog/shopist::shopist::prod
102973+
example: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
102954102974
type: string
102955102975
type:
102956102976
$ref: "#/components/schemas/TestOptimizationServiceSettingsType"
@@ -102993,30 +103013,47 @@ components:
102993103013
description: |-
102994103014
Attributes for updating Test Optimization service settings.
102995103015
All non-required fields are optional; only provided fields will be updated.
103016+
Setting a field to `null` is a no-op. To reset a setting to inherit from the repository level, use the corresponding `<setting>_inherit` field.
102996103017
properties:
102997103018
auto_test_retries_enabled:
102998-
description: Whether Auto Test Retries are enabled for this service.
103019+
description: Whether Auto Test Retries are enabled for this service. Setting to `null` is a no-op; use `auto_test_retries_enabled_inherit` to reset to repository-level inheritance.
103020+
example: false
103021+
type: boolean
103022+
auto_test_retries_enabled_inherit:
103023+
description: When `true`, resets the Auto Test Retries setting to inherit from the repository level.
102999103024
example: false
103000103025
type: boolean
103001103026
code_coverage_enabled:
103002-
description: Whether Code Coverage is enabled for this service.
103027+
description: Whether Code Coverage is enabled for this service. Setting to `null` is a no-op; use `code_coverage_enabled_inherit` to reset to repository-level inheritance.
103028+
example: false
103029+
type: boolean
103030+
code_coverage_enabled_inherit:
103031+
description: When `true`, resets the Code Coverage setting to inherit from the repository level.
103003103032
example: false
103004103033
type: boolean
103005103034
early_flake_detection_enabled:
103006-
description: Whether Early Flake Detection is enabled for this service.
103035+
description: Whether Early Flake Detection is enabled for this service. Setting to `null` is a no-op; use `early_flake_detection_enabled_inherit` to reset to repository-level inheritance.
103036+
example: false
103037+
type: boolean
103038+
early_flake_detection_enabled_inherit:
103039+
description: When `true`, resets the Early Flake Detection setting to inherit from the repository level.
103007103040
example: false
103008103041
type: boolean
103009103042
env:
103010103043
description: The environment name. If omitted, defaults to `none`.
103011103044
example: prod
103012103045
type: string
103013103046
failed_test_replay_enabled:
103014-
description: Whether Failed Test Replay is enabled for this service.
103047+
description: Whether Failed Test Replay is enabled for this service. Setting to `null` is a no-op; use `failed_test_replay_enabled_inherit` to reset to repository-level inheritance.
103048+
example: false
103049+
type: boolean
103050+
failed_test_replay_enabled_inherit:
103051+
description: When `true`, resets the Failed Test Replay setting to inherit from the repository level.
103015103052
example: false
103016103053
type: boolean
103017103054
pr_comments_enabled:
103018-
description: Whether PR Comments are enabled for this service.
103019-
example: true
103055+
description: This field is ignored. PR Comments cannot be overridden at the service level.
103056+
example: false
103020103057
type: boolean
103021103058
repository_id:
103022103059
description: The repository identifier.
@@ -103029,8 +103066,12 @@ components:
103029103066
minLength: 1
103030103067
type: string
103031103068
test_impact_analysis_enabled:
103032-
description: Whether Test Impact Analysis is enabled for this service.
103033-
example: false
103069+
description: Whether Test Impact Analysis is enabled for this service. Setting to `null` is a no-op; use `test_impact_analysis_enabled_inherit` to reset to repository-level inheritance.
103070+
example: true
103071+
type: boolean
103072+
test_impact_analysis_enabled_inherit:
103073+
description: When `true`, resets the Test Impact Analysis setting to inherit from the repository level.
103074+
example: true
103034103075
type: boolean
103035103076
required:
103036103077
- repository_id
@@ -121112,7 +121153,9 @@ paths:
121112121153
patch:
121113121154
description: |-
121114121155
Partially update Test Optimization settings for a specific service identified by repository, service name, and environment.
121115-
Only provided fields are updated; null or omitted fields are left unchanged.
121156+
Only provided fields are updated; setting a field to `null` is a no-op.
121157+
To reset a setting to inherit from the repository level, use the corresponding `<setting>_inherit` field.
121158+
The `pr_comments_enabled` field is ignored as it cannot be overridden at the service level.
121116121159
operationId: UpdateTestOptimizationServiceSettings
121117121160
requestBody:
121118121161
content:
@@ -121122,15 +121165,10 @@ paths:
121122121165
value:
121123121166
data:
121124121167
attributes:
121125-
auto_test_retries_enabled: false
121126-
code_coverage_enabled: false
121127-
early_flake_detection_enabled: false
121128121168
env: prod
121129-
failed_test_replay_enabled: false
121130-
pr_comments_enabled: true
121131121169
repository_id: github.com/datadog/test-service
121132121170
service_name: test-service
121133-
test_impact_analysis_enabled: false
121171+
test_impact_analysis_enabled_inherit: true
121134121172
type: test_optimization_update_service_settings_request
121135121173
schema:
121136121174
$ref: "#/components/schemas/TestOptimizationUpdateServiceSettingsRequest"
@@ -121145,15 +121183,20 @@ paths:
121145121183
data:
121146121184
attributes:
121147121185
auto_test_retries_enabled: false
121186+
auto_test_retries_enabled_is_overridden: false
121148121187
code_coverage_enabled: false
121188+
code_coverage_enabled_is_overridden: false
121149121189
early_flake_detection_enabled: false
121190+
early_flake_detection_enabled_is_overridden: false
121150121191
env: prod
121151121192
failed_test_replay_enabled: false
121152-
pr_comments_enabled: true
121193+
failed_test_replay_enabled_is_overridden: false
121194+
pr_comments_enabled: false
121153121195
repository_id: github.com/datadog/test-service
121154121196
service_name: test-service
121155-
test_impact_analysis_enabled: false
121156-
id: github.com/datadog/test-service::test-service::prod
121197+
test_impact_analysis_enabled: true
121198+
test_impact_analysis_enabled_is_overridden: true
121199+
id: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
121157121200
type: test_optimization_service_settings
121158121201
schema:
121159121202
$ref: "#/components/schemas/TestOptimizationServiceSettingsResponse"
@@ -121207,15 +121250,20 @@ paths:
121207121250
data:
121208121251
attributes:
121209121252
auto_test_retries_enabled: false
121253+
auto_test_retries_enabled_is_overridden: false
121210121254
code_coverage_enabled: false
121255+
code_coverage_enabled_is_overridden: false
121211121256
early_flake_detection_enabled: false
121257+
early_flake_detection_enabled_is_overridden: false
121212121258
env: prod
121213121259
failed_test_replay_enabled: false
121214-
pr_comments_enabled: true
121260+
failed_test_replay_enabled_is_overridden: false
121261+
pr_comments_enabled: false
121215121262
repository_id: github.com/datadog/test-service
121216121263
service_name: test-service
121217-
test_impact_analysis_enabled: false
121218-
id: github.com/datadog/test-service::test-service::prod
121264+
test_impact_analysis_enabled: true
121265+
test_impact_analysis_enabled_is_overridden: true
121266+
id: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
121219121267
type: test_optimization_service_settings
121220121268
schema:
121221121269
$ref: "#/components/schemas/TestOptimizationServiceSettingsResponse"

examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@
77
data: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestData.new({
88
attributes: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestAttributes.new({
99
auto_test_retries_enabled: false,
10+
auto_test_retries_enabled_inherit: false,
1011
code_coverage_enabled: false,
12+
code_coverage_enabled_inherit: false,
1113
early_flake_detection_enabled: false,
14+
early_flake_detection_enabled_inherit: false,
1215
env: "prod",
1316
failed_test_replay_enabled: false,
14-
pr_comments_enabled: true,
17+
failed_test_replay_enabled_inherit: false,
18+
pr_comments_enabled: false,
1519
repository_id: "github.com/datadog/shopist",
1620
service_name: "shopist",
17-
test_impact_analysis_enabled: false,
21+
test_impact_analysis_enabled: true,
22+
test_impact_analysis_enabled_inherit: true,
1823
}),
1924
type: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestDataType::TEST_OPTIMIZATION_UPDATE_SERVICE_SETTINGS_REQUEST,
2025
}),

features/v2/test_optimization.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,21 @@ Feature: Test Optimization
187187
@generated @skip @team:DataDog/ci-app-backend
188188
Scenario: Update Test Optimization service settings returns "Bad Request" response
189189
Given new "UpdateTestOptimizationServiceSettings" request
190-
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"}}
190+
And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "auto_test_retries_enabled_inherit": false, "code_coverage_enabled": false, "code_coverage_enabled_inherit": false, "early_flake_detection_enabled": false, "early_flake_detection_enabled_inherit": false, "env": "prod", "failed_test_replay_enabled": false, "failed_test_replay_enabled_inherit": false, "pr_comments_enabled": false, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": true, "test_impact_analysis_enabled_inherit": true}, "type": "test_optimization_update_service_settings_request"}}
191191
When the request is sent
192192
Then the response status is 400 Bad Request
193193

194194
@generated @skip @team:DataDog/ci-app-backend
195195
Scenario: Update Test Optimization service settings returns "Not Found" response
196196
Given new "UpdateTestOptimizationServiceSettings" request
197-
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"}}
197+
And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "auto_test_retries_enabled_inherit": false, "code_coverage_enabled": false, "code_coverage_enabled_inherit": false, "early_flake_detection_enabled": false, "early_flake_detection_enabled_inherit": false, "env": "prod", "failed_test_replay_enabled": false, "failed_test_replay_enabled_inherit": false, "pr_comments_enabled": false, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": true, "test_impact_analysis_enabled_inherit": true}, "type": "test_optimization_update_service_settings_request"}}
198198
When the request is sent
199199
Then the response status is 404 Not Found
200200

201201
@generated @skip @team:DataDog/ci-app-backend
202202
Scenario: Update Test Optimization service settings returns "OK" response
203203
Given new "UpdateTestOptimizationServiceSettings" request
204-
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"}}
204+
And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "auto_test_retries_enabled_inherit": false, "code_coverage_enabled": false, "code_coverage_enabled_inherit": false, "early_flake_detection_enabled": false, "early_flake_detection_enabled_inherit": false, "env": "prod", "failed_test_replay_enabled": false, "failed_test_replay_enabled_inherit": false, "pr_comments_enabled": false, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": true, "test_impact_analysis_enabled_inherit": true}, "type": "test_optimization_update_service_settings_request"}}
205205
When the request is sent
206206
Then the response status is 200 OK
207207

lib/datadog_api_client/v2/api/test_optimization_api.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,9 @@ def update_test_optimization_service_settings(body, opts = {})
467467
# Update Test Optimization service settings.
468468
#
469469
# Partially update Test Optimization settings for a specific service identified by repository, service name, and environment.
470-
# Only provided fields are updated; null or omitted fields are left unchanged.
470+
# Only provided fields are updated; setting a field to `null` is a no-op.
471+
# To reset a setting to inherit from the repository level, use the corresponding `<setting>_inherit` field.
472+
# The `pr_comments_enabled` field is ignored as it cannot be overridden at the service level.
471473
#
472474
# @param body [TestOptimizationUpdateServiceSettingsRequest]
473475
# @param opts [Hash] the optional parameters

0 commit comments

Comments
 (0)