Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 73 additions & 25 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102910,14 +102910,26 @@ components:
description: Whether Auto Test Retries are enabled for this service.
example: false
type: boolean
auto_test_retries_enabled_is_overridden:
description: Whether the Auto Test Retries setting is overridden at the service level.
example: false
type: boolean
code_coverage_enabled:
description: Whether Code Coverage is enabled for this service.
example: false
type: boolean
code_coverage_enabled_is_overridden:
description: Whether the Code Coverage setting is overridden at the service level.
example: false
type: boolean
early_flake_detection_enabled:
description: Whether Early Flake Detection is enabled for this service.
example: false
type: boolean
early_flake_detection_enabled_is_overridden:
description: Whether the Early Flake Detection setting is overridden at the service level.
example: false
type: boolean
env:
description: The environment name.
example: prod
Expand All @@ -102926,9 +102938,13 @@ components:
description: Whether Failed Test Replay is enabled for this service.
example: false
type: boolean
failed_test_replay_enabled_is_overridden:
description: Whether the Failed Test Replay setting is overridden at the service level.
example: false
type: boolean
pr_comments_enabled:
description: Whether PR Comments are enabled for this service.
example: true
description: Whether PR Comments are enabled. This value reflects the repository-level setting and cannot be overridden at the service level.
example: false
type: boolean
repository_id:
description: The repository identifier.
Expand All @@ -102940,7 +102956,11 @@ components:
type: string
test_impact_analysis_enabled:
description: Whether Test Impact Analysis is enabled for this service.
example: false
example: true
type: boolean
test_impact_analysis_enabled_is_overridden:
description: Whether the Test Impact Analysis setting is overridden at the service level.
example: true
type: boolean
type: object
TestOptimizationServiceSettingsData:
Expand All @@ -102950,7 +102970,7 @@ components:
$ref: "#/components/schemas/TestOptimizationServiceSettingsAttributes"
id:
description: Unique identifier for the service settings.
example: github.com/datadog/shopist::shopist::prod
example: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
type: string
type:
$ref: "#/components/schemas/TestOptimizationServiceSettingsType"
Expand Down Expand Up @@ -102993,30 +103013,47 @@ components:
description: |-
Attributes for updating Test Optimization service settings.
All non-required fields are optional; only provided fields will be updated.
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.
properties:
auto_test_retries_enabled:
description: Whether Auto Test Retries are enabled for this service.
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.
example: false
type: boolean
auto_test_retries_enabled_inherit:
description: When `true`, resets the Auto Test Retries setting to inherit from the repository level.
example: false
type: boolean
code_coverage_enabled:
description: Whether Code Coverage is enabled for this service.
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.
example: false
type: boolean
code_coverage_enabled_inherit:
description: When `true`, resets the Code Coverage setting to inherit from the repository level.
example: false
type: boolean
early_flake_detection_enabled:
description: Whether Early Flake Detection is enabled for this service.
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.
example: false
type: boolean
early_flake_detection_enabled_inherit:
description: When `true`, resets the Early Flake Detection setting to inherit from the repository level.
example: false
type: boolean
env:
description: The environment name. If omitted, defaults to `none`.
example: prod
type: string
failed_test_replay_enabled:
description: Whether Failed Test Replay is enabled for this service.
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.
example: false
type: boolean
failed_test_replay_enabled_inherit:
description: When `true`, resets the Failed Test Replay setting to inherit from the repository level.
example: false
type: boolean
pr_comments_enabled:
description: Whether PR Comments are enabled for this service.
example: true
description: This field is ignored. PR Comments cannot be overridden at the service level.
example: false
type: boolean
repository_id:
description: The repository identifier.
Expand All @@ -103029,8 +103066,12 @@ components:
minLength: 1
type: string
test_impact_analysis_enabled:
description: Whether Test Impact Analysis is enabled for this service.
example: false
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.
example: true
type: boolean
test_impact_analysis_enabled_inherit:
description: When `true`, resets the Test Impact Analysis setting to inherit from the repository level.
example: true
type: boolean
required:
- repository_id
Expand Down Expand Up @@ -121112,7 +121153,9 @@ paths:
patch:
description: |-
Partially update Test Optimization settings for a specific service identified by repository, service name, and environment.
Only provided fields are updated; null or omitted fields are left unchanged.
Only provided fields are updated; 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.
The `pr_comments_enabled` field is ignored as it cannot be overridden at the service level.
operationId: UpdateTestOptimizationServiceSettings
requestBody:
content:
Expand All @@ -121122,15 +121165,10 @@ paths:
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/test-service
service_name: test-service
test_impact_analysis_enabled: false
test_impact_analysis_enabled_inherit: true
type: test_optimization_update_service_settings_request
schema:
$ref: "#/components/schemas/TestOptimizationUpdateServiceSettingsRequest"
Expand All @@ -121145,15 +121183,20 @@ paths:
data:
attributes:
auto_test_retries_enabled: false
auto_test_retries_enabled_is_overridden: false
code_coverage_enabled: false
code_coverage_enabled_is_overridden: false
early_flake_detection_enabled: false
early_flake_detection_enabled_is_overridden: false
env: prod
failed_test_replay_enabled: false
pr_comments_enabled: true
failed_test_replay_enabled_is_overridden: false
pr_comments_enabled: false
repository_id: github.com/datadog/test-service
service_name: test-service
test_impact_analysis_enabled: false
id: github.com/datadog/test-service::test-service::prod
test_impact_analysis_enabled: true
test_impact_analysis_enabled_is_overridden: true
id: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
type: test_optimization_service_settings
schema:
$ref: "#/components/schemas/TestOptimizationServiceSettingsResponse"
Expand Down Expand Up @@ -121207,15 +121250,20 @@ paths:
data:
attributes:
auto_test_retries_enabled: false
auto_test_retries_enabled_is_overridden: false
code_coverage_enabled: false
code_coverage_enabled_is_overridden: false
early_flake_detection_enabled: false
early_flake_detection_enabled_is_overridden: false
env: prod
failed_test_replay_enabled: false
pr_comments_enabled: true
failed_test_replay_enabled_is_overridden: false
pr_comments_enabled: false
repository_id: github.com/datadog/test-service
service_name: test-service
test_impact_analysis_enabled: false
id: github.com/datadog/test-service::test-service::prod
test_impact_analysis_enabled: true
test_impact_analysis_enabled_is_overridden: true
id: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
type: test_optimization_service_settings
schema:
$ref: "#/components/schemas/TestOptimizationServiceSettingsResponse"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@
data: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestData.new({
attributes: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestAttributes.new({
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,
pr_comments_enabled: true,
failed_test_replay_enabled_inherit: false,
pr_comments_enabled: false,
repository_id: "github.com/datadog/shopist",
service_name: "shopist",
test_impact_analysis_enabled: false,
test_impact_analysis_enabled: true,
test_impact_analysis_enabled_inherit: true,
}),
type: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestDataType::TEST_OPTIMIZATION_UPDATE_SERVICE_SETTINGS_REQUEST,
}),
Expand Down
6 changes: 3 additions & 3 deletions features/v2/test_optimization.feature
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,21 @@ Feature: Test Optimization
@generated @skip @team:DataDog/ci-app-backend
Scenario: Update Test Optimization service settings returns "Bad Request" response
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"}}
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"}}
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 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"}}
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"}}
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 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"}}
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"}}
When the request is sent
Then the response status is 200 OK

Expand Down
4 changes: 3 additions & 1 deletion lib/datadog_api_client/v2/api/test_optimization_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,9 @@ def update_test_optimization_service_settings(body, opts = {})
# Update Test Optimization service settings.
#
# Partially update Test Optimization settings for a specific service identified by repository, service name, and environment.
# Only provided fields are updated; null or omitted fields are left unchanged.
# Only provided fields are updated; 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.
# The `pr_comments_enabled` field is ignored as it cannot be overridden at the service level.
#
# @param body [TestOptimizationUpdateServiceSettingsRequest]
# @param opts [Hash] the optional parameters
Expand Down
Loading
Loading