From 958cdf6c711c29d9f898432009e42befdcff072a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 3 Aug 2026 06:11:45 +0000 Subject: [PATCH] Regenerate client from commit 7dcb31f of spec repo --- .generator/schemas/v2/openapi.yaml | 17 +++++++ lib/datadog_api_client/inflector.rb | 1 + .../v2/models/flaky_test_attributes.rb | 45 ++++++++++++++++++- .../v2/models/flaky_test_impact_level.rb | 28 ++++++++++++ 4 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 lib/datadog_api_client/v2/models/flaky_test_impact_level.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c129375f915a..5f48d382ebe5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -38276,6 +38276,17 @@ components: items: $ref: "#/components/schemas/FlakyTestHistory" type: array + impact_level: + $ref: "#/components/schemas/FlakyTestImpactLevel" + nullable: true + impact_score: + description: A score from 0 to 1 indicating the impact of this flaky test, based on factors such as how often it fails and how many pipelines it affects. + example: 0.78 + format: double + maximum: 1 + minimum: 0 + nullable: true + type: number last_flaked_branch: description: The branch name where the test exhibited flakiness for the last time. example: main @@ -38484,6 +38495,12 @@ components: nullable: true type: array type: object + FlakyTestImpactLevel: + description: The impact level of the flaky test, derived from its impact score. + enum: [low, medium, high] + example: medium + type: string + x-enum-varnames: [LOW, MEDIUM, HIGH] FlakyTestPipelineStats: description: CI pipeline related statistics for the flaky test. This information is only available if test runs are associated with CI pipeline events from CI Visibility. properties: diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4278dda627f2..df29244cf7d7 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3347,6 +3347,7 @@ def overrides "v2.flaky_test_history_policy_id" => "FlakyTestHistoryPolicyId", "v2.flaky_test_history_policy_meta" => "FlakyTestHistoryPolicyMeta", "v2.flaky_test_history_policy_meta_config" => "FlakyTestHistoryPolicyMetaConfig", + "v2.flaky_test_impact_level" => "FlakyTestImpactLevel", "v2.flaky_test_pipeline_stats" => "FlakyTestPipelineStats", "v2.flaky_test_run_metadata" => "FlakyTestRunMetadata", "v2.flaky_tests_pagination" => "FlakyTestsPagination", diff --git a/lib/datadog_api_client/v2/models/flaky_test_attributes.rb b/lib/datadog_api_client/v2/models/flaky_test_attributes.rb index 9f534395109e..f6b2e6c3c794 100644 --- a/lib/datadog_api_client/v2/models/flaky_test_attributes.rb +++ b/lib/datadog_api_client/v2/models/flaky_test_attributes.rb @@ -52,6 +52,12 @@ class FlakyTestAttributes # Includes state transitions like new -> quarantined -> fixed, along with the associated commit SHA when available. attr_accessor :history + # The impact level of the flaky test, derived from its impact score. + attr_accessor :impact_level + + # A score from 0 to 1 indicating the impact of this flaky test, based on factors such as how often it fails and how many pipelines it affects. + attr_reader :impact_score + # The branch name where the test exhibited flakiness for the last time. attr_accessor :last_flaked_branch @@ -105,6 +111,8 @@ def self.attribute_map :'flaky_category' => :'flaky_category', :'flaky_state' => :'flaky_state', :'history' => :'history', + :'impact_level' => :'impact_level', + :'impact_score' => :'impact_score', :'last_flaked_branch' => :'last_flaked_branch', :'last_flaked_sha' => :'last_flaked_sha', :'last_flaked_ts' => :'last_flaked_ts', @@ -131,6 +139,8 @@ def self.openapi_types :'flaky_category' => :'String', :'flaky_state' => :'FlakyTestAttributesFlakyState', :'history' => :'Array', + :'impact_level' => :'FlakyTestImpactLevel', + :'impact_score' => :'Float', :'last_flaked_branch' => :'String', :'last_flaked_sha' => :'String', :'last_flaked_ts' => :'Integer', @@ -149,6 +159,7 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'flaky_category', + :'impact_score', :'_module', ]) end @@ -213,6 +224,14 @@ def initialize(attributes = {}) end end + if attributes.key?(:'impact_level') + self.impact_level = attributes[:'impact_level'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + if attributes.key?(:'last_flaked_branch') self.last_flaked_branch = attributes[:'last_flaked_branch'] end @@ -256,6 +275,28 @@ def initialize(attributes = {}) end end + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@impact_score.nil? && @impact_score > 1 + return false if !@impact_score.nil? && @impact_score < 0 + true + end + + # Custom attribute writer method with validation + # @param impact_score [Object] Object to be assigned + # @!visibility private + def impact_score=(impact_score) + if !impact_score.nil? && impact_score > 1 + fail ArgumentError, 'invalid value for "impact_score", must be smaller than or equal to 1.' + end + if !impact_score.nil? && impact_score < 0 + fail ArgumentError, 'invalid value for "impact_score", must be greater than or equal to 0.' + end + @impact_score = impact_score + end + # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -291,6 +332,8 @@ def ==(o) flaky_category == o.flaky_category && flaky_state == o.flaky_state && history == o.history && + impact_level == o.impact_level && + impact_score == o.impact_score && last_flaked_branch == o.last_flaked_branch && last_flaked_sha == o.last_flaked_sha && last_flaked_ts == o.last_flaked_ts && @@ -308,7 +351,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attempt_to_fix_id, codeowners, envs, first_flaked_branch, first_flaked_sha, first_flaked_ts, flaky_category, flaky_state, history, last_flaked_branch, last_flaked_sha, last_flaked_ts, _module, name, pipeline_stats, services, suite, test_run_metadata, test_stats, additional_properties].hash + [attempt_to_fix_id, codeowners, envs, first_flaked_branch, first_flaked_sha, first_flaked_ts, flaky_category, flaky_state, history, impact_level, impact_score, last_flaked_branch, last_flaked_sha, last_flaked_ts, _module, name, pipeline_stats, services, suite, test_run_metadata, test_stats, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/flaky_test_impact_level.rb b/lib/datadog_api_client/v2/models/flaky_test_impact_level.rb new file mode 100644 index 000000000000..51ddc1c0d156 --- /dev/null +++ b/lib/datadog_api_client/v2/models/flaky_test_impact_level.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The impact level of the flaky test, derived from its impact score. + class FlakyTestImpactLevel + include BaseEnumModel + + LOW = "low".freeze + MEDIUM = "medium".freeze + HIGH = "high".freeze + end +end