Skip to content
Open
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
17 changes: 17 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions services/test_optimization/src/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export { FlakyTestHistory } from "./models/FlakyTestHistory";
export { FlakyTestHistoryPolicyId } from "./models/FlakyTestHistoryPolicyId";
export { FlakyTestHistoryPolicyMeta } from "./models/FlakyTestHistoryPolicyMeta";
export { FlakyTestHistoryPolicyMetaConfig } from "./models/FlakyTestHistoryPolicyMetaConfig";
export { FlakyTestImpactLevel } from "./models/FlakyTestImpactLevel";
export { FlakyTestPipelineStats } from "./models/FlakyTestPipelineStats";
export { FlakyTestRunMetadata } from "./models/FlakyTestRunMetadata";
export { FlakyTestsPagination } from "./models/FlakyTestsPagination";
Expand Down
18 changes: 18 additions & 0 deletions services/test_optimization/src/v2/models/FlakyTestAttributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client";

import { FlakyTestAttributesFlakyState } from "./FlakyTestAttributesFlakyState";
import { FlakyTestHistory } from "./FlakyTestHistory";
import { FlakyTestImpactLevel } from "./FlakyTestImpactLevel";
import { FlakyTestPipelineStats } from "./FlakyTestPipelineStats";
import { FlakyTestRunMetadata } from "./FlakyTestRunMetadata";
import { FlakyTestStats } from "./FlakyTestStats";
Expand Down Expand Up @@ -50,6 +51,14 @@ export class FlakyTestAttributes {
* Includes state transitions like new -> quarantined -> fixed, along with the associated commit SHA when available.
*/
"history"?: Array<FlakyTestHistory>;
/**
* The impact level of the flaky test, derived from its impact score.
*/
"impactLevel"?: FlakyTestImpactLevel;
/**
* 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.
*/
"impactScore"?: number;
/**
* The branch name where the test exhibited flakiness for the last time.
*/
Expand Down Expand Up @@ -150,6 +159,15 @@ export class FlakyTestAttributes {
baseName: "history",
type: "Array<FlakyTestHistory>",
},
impactLevel: {
baseName: "impact_level",
type: "FlakyTestImpactLevel",
},
impactScore: {
baseName: "impact_score",
type: "number",
format: "double",
},
lastFlakedBranch: {
baseName: "last_flaked_branch",
type: "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { UnparsedObject } from "@datadog/datadog-api-client";

/**
* The impact level of the flaky test, derived from its impact score.
*/
export type FlakyTestImpactLevel =
| typeof LOW
| typeof MEDIUM
| typeof HIGH
| UnparsedObject;
export const LOW = "low";
export const MEDIUM = "medium";
export const HIGH = "high";
1 change: 1 addition & 0 deletions services/test_optimization/src/v2/models/TypingInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const TypingInfo: ModelTypingInfo = {
"ftm_policy.quarantine.days_active",
"unknown",
],
FlakyTestImpactLevel: ["low", "medium", "high"],
FlakyTestType: ["flaky_test"],
FlakyTestsSearchRequestDataType: ["search_flaky_tests_request"],
FlakyTestsSearchSort: [
Expand Down
Loading