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 @@ -21,14 +21,19 @@
data=TestOptimizationUpdateServiceSettingsRequestData(
attributes=TestOptimizationUpdateServiceSettingsRequestAttributes(
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=TestOptimizationUpdateServiceSettingsRequestDataType.TEST_OPTIMIZATION_UPDATE_SERVICE_SETTINGS_REQUEST,
),
Expand Down
4 changes: 3 additions & 1 deletion src/datadog_api_client/v2/api/test_optimization_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ def update_test_optimization_service_settings(
"""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.

:type body: TestOptimizationUpdateServiceSettingsRequest
:rtype: TestOptimizationServiceSettingsResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,54 @@ class TestOptimizationServiceSettingsAttributes(ModelNormal):
def openapi_types(_):
return {
"auto_test_retries_enabled": (bool,),
"auto_test_retries_enabled_is_overridden": (bool,),
"code_coverage_enabled": (bool,),
"code_coverage_enabled_is_overridden": (bool,),
"early_flake_detection_enabled": (bool,),
"early_flake_detection_enabled_is_overridden": (bool,),
"env": (str,),
"failed_test_replay_enabled": (bool,),
"failed_test_replay_enabled_is_overridden": (bool,),
"pr_comments_enabled": (bool,),
"repository_id": (str,),
"service_name": (str,),
"test_impact_analysis_enabled": (bool,),
"test_impact_analysis_enabled_is_overridden": (bool,),
}

attribute_map = {
"auto_test_retries_enabled": "auto_test_retries_enabled",
"auto_test_retries_enabled_is_overridden": "auto_test_retries_enabled_is_overridden",
"code_coverage_enabled": "code_coverage_enabled",
"code_coverage_enabled_is_overridden": "code_coverage_enabled_is_overridden",
"early_flake_detection_enabled": "early_flake_detection_enabled",
"early_flake_detection_enabled_is_overridden": "early_flake_detection_enabled_is_overridden",
"env": "env",
"failed_test_replay_enabled": "failed_test_replay_enabled",
"failed_test_replay_enabled_is_overridden": "failed_test_replay_enabled_is_overridden",
"pr_comments_enabled": "pr_comments_enabled",
"repository_id": "repository_id",
"service_name": "service_name",
"test_impact_analysis_enabled": "test_impact_analysis_enabled",
"test_impact_analysis_enabled_is_overridden": "test_impact_analysis_enabled_is_overridden",
}

def __init__(
self_,
auto_test_retries_enabled: Union[bool, UnsetType] = unset,
auto_test_retries_enabled_is_overridden: Union[bool, UnsetType] = unset,
code_coverage_enabled: Union[bool, UnsetType] = unset,
code_coverage_enabled_is_overridden: Union[bool, UnsetType] = unset,
early_flake_detection_enabled: Union[bool, UnsetType] = unset,
early_flake_detection_enabled_is_overridden: Union[bool, UnsetType] = unset,
env: Union[str, UnsetType] = unset,
failed_test_replay_enabled: Union[bool, UnsetType] = unset,
failed_test_replay_enabled_is_overridden: Union[bool, UnsetType] = unset,
pr_comments_enabled: Union[bool, UnsetType] = unset,
repository_id: Union[str, UnsetType] = unset,
service_name: Union[str, UnsetType] = unset,
test_impact_analysis_enabled: Union[bool, UnsetType] = unset,
test_impact_analysis_enabled_is_overridden: Union[bool, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -59,19 +74,31 @@ def __init__(
:param auto_test_retries_enabled: Whether Auto Test Retries are enabled for this service.
:type auto_test_retries_enabled: bool, optional

:param auto_test_retries_enabled_is_overridden: Whether the Auto Test Retries setting is overridden at the service level.
:type auto_test_retries_enabled_is_overridden: bool, optional

:param code_coverage_enabled: Whether Code Coverage is enabled for this service.
:type code_coverage_enabled: bool, optional

:param code_coverage_enabled_is_overridden: Whether the Code Coverage setting is overridden at the service level.
:type code_coverage_enabled_is_overridden: bool, optional

:param early_flake_detection_enabled: Whether Early Flake Detection is enabled for this service.
:type early_flake_detection_enabled: bool, optional

:param early_flake_detection_enabled_is_overridden: Whether the Early Flake Detection setting is overridden at the service level.
:type early_flake_detection_enabled_is_overridden: bool, optional

:param env: The environment name.
:type env: str, optional

:param failed_test_replay_enabled: Whether Failed Test Replay is enabled for this service.
:type failed_test_replay_enabled: bool, optional

:param pr_comments_enabled: Whether PR Comments are enabled for this service.
:param failed_test_replay_enabled_is_overridden: Whether the Failed Test Replay setting is overridden at the service level.
:type failed_test_replay_enabled_is_overridden: bool, optional

:param pr_comments_enabled: Whether PR Comments are enabled. This value reflects the repository-level setting and cannot be overridden at the service level.
:type pr_comments_enabled: bool, optional

:param repository_id: The repository identifier.
Expand All @@ -82,17 +109,28 @@ def __init__(

:param test_impact_analysis_enabled: Whether Test Impact Analysis is enabled for this service.
:type test_impact_analysis_enabled: bool, optional

:param test_impact_analysis_enabled_is_overridden: Whether the Test Impact Analysis setting is overridden at the service level.
:type test_impact_analysis_enabled_is_overridden: bool, optional
"""
if auto_test_retries_enabled is not unset:
kwargs["auto_test_retries_enabled"] = auto_test_retries_enabled
if auto_test_retries_enabled_is_overridden is not unset:
kwargs["auto_test_retries_enabled_is_overridden"] = auto_test_retries_enabled_is_overridden
if code_coverage_enabled is not unset:
kwargs["code_coverage_enabled"] = code_coverage_enabled
if code_coverage_enabled_is_overridden is not unset:
kwargs["code_coverage_enabled_is_overridden"] = code_coverage_enabled_is_overridden
if early_flake_detection_enabled is not unset:
kwargs["early_flake_detection_enabled"] = early_flake_detection_enabled
if early_flake_detection_enabled_is_overridden is not unset:
kwargs["early_flake_detection_enabled_is_overridden"] = early_flake_detection_enabled_is_overridden
if env is not unset:
kwargs["env"] = env
if failed_test_replay_enabled is not unset:
kwargs["failed_test_replay_enabled"] = failed_test_replay_enabled
if failed_test_replay_enabled_is_overridden is not unset:
kwargs["failed_test_replay_enabled_is_overridden"] = failed_test_replay_enabled_is_overridden
if pr_comments_enabled is not unset:
kwargs["pr_comments_enabled"] = pr_comments_enabled
if repository_id is not unset:
Expand All @@ -101,4 +139,6 @@ def __init__(
kwargs["service_name"] = service_name
if test_impact_analysis_enabled is not unset:
kwargs["test_impact_analysis_enabled"] = test_impact_analysis_enabled
if test_impact_analysis_enabled_is_overridden is not unset:
kwargs["test_impact_analysis_enabled_is_overridden"] = test_impact_analysis_enabled_is_overridden
super().__init__(kwargs)
Loading
Loading