From af111a992bb4b7175a50fc0186a67197b47861a3 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 19 Jun 2026 08:04:47 +0000 Subject: [PATCH] Regenerate client from commit e639938 of spec repo --- .generator/schemas/v2/openapi.yaml | 98 ++++++++++++++----- .../UpdateTestOptimizationServiceSettings.rb | 9 +- features/v2/test_optimization.feature | 6 +- .../v2/api/test_optimization_api.rb | 4 +- ...ptimization_service_settings_attributes.rb | 58 ++++++++++- ...ate_service_settings_request_attributes.rb | 69 +++++++++++-- ...on_update_service_settings_request_data.rb | 1 + 7 files changed, 201 insertions(+), 44 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 500a3319903c..65d674fb23d1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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 @@ -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. @@ -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: @@ -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" @@ -102993,17 +103013,30 @@ 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 `_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: @@ -103011,12 +103044,16 @@ components: 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. @@ -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 @@ -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 `_inherit` field. + The `pr_comments_enabled` field is ignored as it cannot be overridden at the service level. operationId: UpdateTestOptimizationServiceSettings requestBody: content: @@ -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" @@ -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" @@ -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" diff --git a/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb b/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb index 8cec095c73fb..7526a9e12fbc 100644 --- a/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb +++ b/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb @@ -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, }), diff --git a/features/v2/test_optimization.feature b/features/v2/test_optimization.feature index c363d29f04c7..342eda12e8fb 100644 --- a/features/v2/test_optimization.feature +++ b/features/v2/test_optimization.feature @@ -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 diff --git a/lib/datadog_api_client/v2/api/test_optimization_api.rb b/lib/datadog_api_client/v2/api/test_optimization_api.rb index ac74b9328b03..022552f20164 100644 --- a/lib/datadog_api_client/v2/api/test_optimization_api.rb +++ b/lib/datadog_api_client/v2/api/test_optimization_api.rb @@ -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 `_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 diff --git a/lib/datadog_api_client/v2/models/test_optimization_service_settings_attributes.rb b/lib/datadog_api_client/v2/models/test_optimization_service_settings_attributes.rb index eb5a0cbdca31..e63abcee371e 100644 --- a/lib/datadog_api_client/v2/models/test_optimization_service_settings_attributes.rb +++ b/lib/datadog_api_client/v2/models/test_optimization_service_settings_attributes.rb @@ -24,19 +24,31 @@ class TestOptimizationServiceSettingsAttributes # Whether Auto Test Retries are enabled for this service. attr_accessor :auto_test_retries_enabled + # Whether the Auto Test Retries setting is overridden at the service level. + attr_accessor :auto_test_retries_enabled_is_overridden + # Whether Code Coverage is enabled for this service. attr_accessor :code_coverage_enabled + # Whether the Code Coverage setting is overridden at the service level. + attr_accessor :code_coverage_enabled_is_overridden + # Whether Early Flake Detection is enabled for this service. attr_accessor :early_flake_detection_enabled + # Whether the Early Flake Detection setting is overridden at the service level. + attr_accessor :early_flake_detection_enabled_is_overridden + # The environment name. attr_accessor :env # Whether Failed Test Replay is enabled for this service. attr_accessor :failed_test_replay_enabled - # Whether PR Comments are enabled for this service. + # Whether the Failed Test Replay setting is overridden at the service level. + attr_accessor :failed_test_replay_enabled_is_overridden + + # Whether PR Comments are enabled. This value reflects the repository-level setting and cannot be overridden at the service level. attr_accessor :pr_comments_enabled # The repository identifier. @@ -48,6 +60,9 @@ class TestOptimizationServiceSettingsAttributes # Whether Test Impact Analysis is enabled for this service. attr_accessor :test_impact_analysis_enabled + # Whether the Test Impact Analysis setting is overridden at the service level. + attr_accessor :test_impact_analysis_enabled_is_overridden + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -55,14 +70,19 @@ class TestOptimizationServiceSettingsAttributes def self.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' => :'test_impact_analysis_enabled', + :'test_impact_analysis_enabled_is_overridden' => :'test_impact_analysis_enabled_is_overridden' } end @@ -71,14 +91,19 @@ def self.attribute_map def self.openapi_types { :'auto_test_retries_enabled' => :'Boolean', + :'auto_test_retries_enabled_is_overridden' => :'Boolean', :'code_coverage_enabled' => :'Boolean', + :'code_coverage_enabled_is_overridden' => :'Boolean', :'early_flake_detection_enabled' => :'Boolean', + :'early_flake_detection_enabled_is_overridden' => :'Boolean', :'env' => :'String', :'failed_test_replay_enabled' => :'Boolean', + :'failed_test_replay_enabled_is_overridden' => :'Boolean', :'pr_comments_enabled' => :'Boolean', :'repository_id' => :'String', :'service_name' => :'String', - :'test_impact_analysis_enabled' => :'Boolean' + :'test_impact_analysis_enabled' => :'Boolean', + :'test_impact_analysis_enabled_is_overridden' => :'Boolean' } end @@ -104,14 +129,26 @@ def initialize(attributes = {}) self.auto_test_retries_enabled = attributes[:'auto_test_retries_enabled'] end + if attributes.key?(:'auto_test_retries_enabled_is_overridden') + self.auto_test_retries_enabled_is_overridden = attributes[:'auto_test_retries_enabled_is_overridden'] + end + if attributes.key?(:'code_coverage_enabled') self.code_coverage_enabled = attributes[:'code_coverage_enabled'] end + if attributes.key?(:'code_coverage_enabled_is_overridden') + self.code_coverage_enabled_is_overridden = attributes[:'code_coverage_enabled_is_overridden'] + end + if attributes.key?(:'early_flake_detection_enabled') self.early_flake_detection_enabled = attributes[:'early_flake_detection_enabled'] end + if attributes.key?(:'early_flake_detection_enabled_is_overridden') + self.early_flake_detection_enabled_is_overridden = attributes[:'early_flake_detection_enabled_is_overridden'] + end + if attributes.key?(:'env') self.env = attributes[:'env'] end @@ -120,6 +157,10 @@ def initialize(attributes = {}) self.failed_test_replay_enabled = attributes[:'failed_test_replay_enabled'] end + if attributes.key?(:'failed_test_replay_enabled_is_overridden') + self.failed_test_replay_enabled_is_overridden = attributes[:'failed_test_replay_enabled_is_overridden'] + end + if attributes.key?(:'pr_comments_enabled') self.pr_comments_enabled = attributes[:'pr_comments_enabled'] end @@ -135,6 +176,10 @@ def initialize(attributes = {}) if attributes.key?(:'test_impact_analysis_enabled') self.test_impact_analysis_enabled = attributes[:'test_impact_analysis_enabled'] end + + if attributes.key?(:'test_impact_analysis_enabled_is_overridden') + self.test_impact_analysis_enabled_is_overridden = attributes[:'test_impact_analysis_enabled_is_overridden'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -164,14 +209,19 @@ def ==(o) return true if self.equal?(o) self.class == o.class && auto_test_retries_enabled == o.auto_test_retries_enabled && + auto_test_retries_enabled_is_overridden == o.auto_test_retries_enabled_is_overridden && code_coverage_enabled == o.code_coverage_enabled && + code_coverage_enabled_is_overridden == o.code_coverage_enabled_is_overridden && early_flake_detection_enabled == o.early_flake_detection_enabled && + early_flake_detection_enabled_is_overridden == o.early_flake_detection_enabled_is_overridden && env == o.env && failed_test_replay_enabled == o.failed_test_replay_enabled && + failed_test_replay_enabled_is_overridden == o.failed_test_replay_enabled_is_overridden && pr_comments_enabled == o.pr_comments_enabled && repository_id == o.repository_id && service_name == o.service_name && test_impact_analysis_enabled == o.test_impact_analysis_enabled && + test_impact_analysis_enabled_is_overridden == o.test_impact_analysis_enabled_is_overridden && additional_properties == o.additional_properties end @@ -179,7 +229,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [auto_test_retries_enabled, code_coverage_enabled, early_flake_detection_enabled, env, failed_test_replay_enabled, pr_comments_enabled, repository_id, service_name, test_impact_analysis_enabled, additional_properties].hash + [auto_test_retries_enabled, auto_test_retries_enabled_is_overridden, code_coverage_enabled, code_coverage_enabled_is_overridden, early_flake_detection_enabled, early_flake_detection_enabled_is_overridden, env, failed_test_replay_enabled, failed_test_replay_enabled_is_overridden, pr_comments_enabled, repository_id, service_name, test_impact_analysis_enabled, test_impact_analysis_enabled_is_overridden, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_attributes.rb b/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_attributes.rb index 2ea0b8a6cc68..ce257c529895 100644 --- a/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_attributes.rb @@ -19,25 +19,38 @@ module DatadogAPIClient::V2 # 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 `_inherit` field. class TestOptimizationUpdateServiceSettingsRequestAttributes include BaseGenericModel - # Whether Auto Test Retries are enabled for this service. + # 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. attr_accessor :auto_test_retries_enabled - # Whether Code Coverage is enabled for this service. + # When `true`, resets the Auto Test Retries setting to inherit from the repository level. + attr_accessor :auto_test_retries_enabled_inherit + + # 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. attr_accessor :code_coverage_enabled - # Whether Early Flake Detection is enabled for this service. + # When `true`, resets the Code Coverage setting to inherit from the repository level. + attr_accessor :code_coverage_enabled_inherit + + # 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. attr_accessor :early_flake_detection_enabled + # When `true`, resets the Early Flake Detection setting to inherit from the repository level. + attr_accessor :early_flake_detection_enabled_inherit + # The environment name. If omitted, defaults to `none`. attr_accessor :env - # Whether Failed Test Replay is enabled for this service. + # 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. attr_accessor :failed_test_replay_enabled - # Whether PR Comments are enabled for this service. + # When `true`, resets the Failed Test Replay setting to inherit from the repository level. + attr_accessor :failed_test_replay_enabled_inherit + + # This field is ignored. PR Comments cannot be overridden at the service level. attr_accessor :pr_comments_enabled # The repository identifier. @@ -46,9 +59,12 @@ class TestOptimizationUpdateServiceSettingsRequestAttributes # The service name. attr_reader :service_name - # Whether Test Impact Analysis is enabled for this service. + # 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. attr_accessor :test_impact_analysis_enabled + # When `true`, resets the Test Impact Analysis setting to inherit from the repository level. + attr_accessor :test_impact_analysis_enabled_inherit + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -56,14 +72,19 @@ class TestOptimizationUpdateServiceSettingsRequestAttributes def self.attribute_map { :'auto_test_retries_enabled' => :'auto_test_retries_enabled', + :'auto_test_retries_enabled_inherit' => :'auto_test_retries_enabled_inherit', :'code_coverage_enabled' => :'code_coverage_enabled', + :'code_coverage_enabled_inherit' => :'code_coverage_enabled_inherit', :'early_flake_detection_enabled' => :'early_flake_detection_enabled', + :'early_flake_detection_enabled_inherit' => :'early_flake_detection_enabled_inherit', :'env' => :'env', :'failed_test_replay_enabled' => :'failed_test_replay_enabled', + :'failed_test_replay_enabled_inherit' => :'failed_test_replay_enabled_inherit', :'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' => :'test_impact_analysis_enabled', + :'test_impact_analysis_enabled_inherit' => :'test_impact_analysis_enabled_inherit' } end @@ -72,14 +93,19 @@ def self.attribute_map def self.openapi_types { :'auto_test_retries_enabled' => :'Boolean', + :'auto_test_retries_enabled_inherit' => :'Boolean', :'code_coverage_enabled' => :'Boolean', + :'code_coverage_enabled_inherit' => :'Boolean', :'early_flake_detection_enabled' => :'Boolean', + :'early_flake_detection_enabled_inherit' => :'Boolean', :'env' => :'String', :'failed_test_replay_enabled' => :'Boolean', + :'failed_test_replay_enabled_inherit' => :'Boolean', :'pr_comments_enabled' => :'Boolean', :'repository_id' => :'String', :'service_name' => :'String', - :'test_impact_analysis_enabled' => :'Boolean' + :'test_impact_analysis_enabled' => :'Boolean', + :'test_impact_analysis_enabled_inherit' => :'Boolean' } end @@ -105,14 +131,26 @@ def initialize(attributes = {}) self.auto_test_retries_enabled = attributes[:'auto_test_retries_enabled'] end + if attributes.key?(:'auto_test_retries_enabled_inherit') + self.auto_test_retries_enabled_inherit = attributes[:'auto_test_retries_enabled_inherit'] + end + if attributes.key?(:'code_coverage_enabled') self.code_coverage_enabled = attributes[:'code_coverage_enabled'] end + if attributes.key?(:'code_coverage_enabled_inherit') + self.code_coverage_enabled_inherit = attributes[:'code_coverage_enabled_inherit'] + end + if attributes.key?(:'early_flake_detection_enabled') self.early_flake_detection_enabled = attributes[:'early_flake_detection_enabled'] end + if attributes.key?(:'early_flake_detection_enabled_inherit') + self.early_flake_detection_enabled_inherit = attributes[:'early_flake_detection_enabled_inherit'] + end + if attributes.key?(:'env') self.env = attributes[:'env'] end @@ -121,6 +159,10 @@ def initialize(attributes = {}) self.failed_test_replay_enabled = attributes[:'failed_test_replay_enabled'] end + if attributes.key?(:'failed_test_replay_enabled_inherit') + self.failed_test_replay_enabled_inherit = attributes[:'failed_test_replay_enabled_inherit'] + end + if attributes.key?(:'pr_comments_enabled') self.pr_comments_enabled = attributes[:'pr_comments_enabled'] end @@ -136,6 +178,10 @@ def initialize(attributes = {}) if attributes.key?(:'test_impact_analysis_enabled') self.test_impact_analysis_enabled = attributes[:'test_impact_analysis_enabled'] end + + if attributes.key?(:'test_impact_analysis_enabled_inherit') + self.test_impact_analysis_enabled_inherit = attributes[:'test_impact_analysis_enabled_inherit'] + end end # Check to see if the all the properties in the model are valid @@ -202,14 +248,19 @@ def ==(o) return true if self.equal?(o) self.class == o.class && auto_test_retries_enabled == o.auto_test_retries_enabled && + auto_test_retries_enabled_inherit == o.auto_test_retries_enabled_inherit && code_coverage_enabled == o.code_coverage_enabled && + code_coverage_enabled_inherit == o.code_coverage_enabled_inherit && early_flake_detection_enabled == o.early_flake_detection_enabled && + early_flake_detection_enabled_inherit == o.early_flake_detection_enabled_inherit && env == o.env && failed_test_replay_enabled == o.failed_test_replay_enabled && + failed_test_replay_enabled_inherit == o.failed_test_replay_enabled_inherit && pr_comments_enabled == o.pr_comments_enabled && repository_id == o.repository_id && service_name == o.service_name && test_impact_analysis_enabled == o.test_impact_analysis_enabled && + test_impact_analysis_enabled_inherit == o.test_impact_analysis_enabled_inherit && additional_properties == o.additional_properties end @@ -217,7 +268,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [auto_test_retries_enabled, code_coverage_enabled, early_flake_detection_enabled, env, failed_test_replay_enabled, pr_comments_enabled, repository_id, service_name, test_impact_analysis_enabled, additional_properties].hash + [auto_test_retries_enabled, auto_test_retries_enabled_inherit, code_coverage_enabled, code_coverage_enabled_inherit, early_flake_detection_enabled, early_flake_detection_enabled_inherit, env, failed_test_replay_enabled, failed_test_replay_enabled_inherit, pr_comments_enabled, repository_id, service_name, test_impact_analysis_enabled, test_impact_analysis_enabled_inherit, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_data.rb b/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_data.rb index c9287e586d13..87523ff8a5a0 100644 --- a/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_data.rb +++ b/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_data.rb @@ -23,6 +23,7 @@ class TestOptimizationUpdateServiceSettingsRequestData # 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 `_inherit` field. attr_reader :attributes # JSON:API type for update service settings request.