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
35 changes: 26 additions & 9 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31063,9 +31063,17 @@ components:
type: string
values:
description: |-
Column values in row order. The element type matches the column's `type`;
for example a `VARCHAR` column carries strings, a `TIMESTAMP` column carries
Unix-millisecond integers. `null` is allowed for missing values.
Column values in row order, one entry per result row. The element type
follows the column's `type`. The following serialization rules should be
taken into account:

- `BIGINT` values are encoded as JSON numbers in the signed 64-bit integer range.
- `DECIMAL` values are encoded as JSON numbers with 64-bit double precision.
- `TIMESTAMP` and `DATE` values are encoded as Unix-millisecond integers; a
`DATE` resolves to midnight UTC.
- `JSON` values are returned as a JSON-encoded string.

`null` is allowed for any column type where a value is missing.
example:
- web-store
- checkout
Expand Down Expand Up @@ -38212,6 +38220,15 @@ 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
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 @@ -38420,6 +38437,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 Expand Up @@ -135602,9 +135625,6 @@ paths:
summary: Execute a tabular DDSQL query
tags:
- DDSQL
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/ddsql/query/tabular/fetch:
post:
description: |-
Expand Down Expand Up @@ -135713,9 +135733,6 @@ paths:
summary: Fetch the result of a DDSQL query
tags:
- DDSQL
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/deletion/data/{product}:
post:
description: Creates a data deletion request by providing a query and a timeframe targeting the proper data.
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,6 @@ public class ApiClient {
put("v2.getAllDatasets", false);
put("v2.getDataset", false);
put("v2.updateDataset", false);
put("v2.executeDdsqlTabularQuery", false);
put("v2.fetchDdsqlTabularQuery", false);
put("v2.cancelDataDeletionRequest", false);
put("v2.createDataDeletionRequest", false);
put("v2.getDataDeletionRequests", false);
Expand Down
34 changes: 0 additions & 34 deletions src/main/java/com/datadog/api/client/v2/api/DdsqlApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ public CompletableFuture<DdsqlTabularQueryResponse> executeDdsqlTabularQueryAsyn
*/
public ApiResponse<DdsqlTabularQueryResponse> executeDdsqlTabularQueryWithHttpInfo(
DdsqlTabularQueryRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "executeDdsqlTabularQuery";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -146,16 +139,6 @@ public ApiResponse<DdsqlTabularQueryResponse> executeDdsqlTabularQueryWithHttpIn
*/
public CompletableFuture<ApiResponse<DdsqlTabularQueryResponse>>
executeDdsqlTabularQueryWithHttpInfoAsync(DdsqlTabularQueryRequest body) {
// Check if unstable operation is enabled
String operationId = "executeDdsqlTabularQuery";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<DdsqlTabularQueryResponse>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -252,13 +235,6 @@ public CompletableFuture<DdsqlTabularQueryResponse> fetchDdsqlTabularQueryAsync(
*/
public ApiResponse<DdsqlTabularQueryResponse> fetchDdsqlTabularQueryWithHttpInfo(
DdsqlTabularQueryFetchRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "fetchDdsqlTabularQuery";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -301,16 +277,6 @@ public ApiResponse<DdsqlTabularQueryResponse> fetchDdsqlTabularQueryWithHttpInfo
*/
public CompletableFuture<ApiResponse<DdsqlTabularQueryResponse>>
fetchDdsqlTabularQueryWithHttpInfoAsync(DdsqlTabularQueryFetchRequest body) {
// Check if unstable operation is enabled
String operationId = "fetchDdsqlTabularQuery";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<DdsqlTabularQueryResponse>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,19 @@ public DdsqlTabularQueryColumn addValuesItem(Object valuesItem) {
}

/**
* Column values in row order. The element type matches the column's <code>type</code>; for
* example a <code>VARCHAR</code> column carries strings, a <code>TIMESTAMP</code> column carries
* Unix-millisecond integers. <code>null</code> is allowed for missing values.
* Column values in row order, one entry per result row. The element type follows the column's
* <code>type</code>. The following serialization rules should be taken into account:
*
* <ul>
* <li><code>BIGINT</code> values are encoded as JSON numbers in the signed 64-bit integer
* range.
* <li><code>DECIMAL</code> values are encoded as JSON numbers with 64-bit double precision.
* <li><code>TIMESTAMP</code> and <code>DATE</code> values are encoded as Unix-millisecond
* integers; a <code>DATE</code> resolves to midnight UTC.
* <li><code>JSON</code> values are returned as a JSON-encoded string.
* </ul>
*
* <p><code>null</code> is allowed for any column type where a value is missing.
*
* @return values
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
FlakyTestAttributes.JSON_PROPERTY_FLAKY_CATEGORY,
FlakyTestAttributes.JSON_PROPERTY_FLAKY_STATE,
FlakyTestAttributes.JSON_PROPERTY_HISTORY,
FlakyTestAttributes.JSON_PROPERTY_IMPACT_LEVEL,
FlakyTestAttributes.JSON_PROPERTY_IMPACT_SCORE,
FlakyTestAttributes.JSON_PROPERTY_LAST_FLAKED_BRANCH,
FlakyTestAttributes.JSON_PROPERTY_LAST_FLAKED_SHA,
FlakyTestAttributes.JSON_PROPERTY_LAST_FLAKED_TS,
Expand Down Expand Up @@ -72,6 +74,12 @@ public class FlakyTestAttributes {
public static final String JSON_PROPERTY_HISTORY = "history";
private List<FlakyTestHistory> history = null;

public static final String JSON_PROPERTY_IMPACT_LEVEL = "impact_level";
private FlakyTestImpactLevel impactLevel;

public static final String JSON_PROPERTY_IMPACT_SCORE = "impact_score";
private JsonNullable<Double> impactScore = JsonNullable.<Double>undefined();

public static final String JSON_PROPERTY_LAST_FLAKED_BRANCH = "last_flaked_branch";
private String lastFlakedBranch;

Expand Down Expand Up @@ -348,6 +356,63 @@ public void setHistory(List<FlakyTestHistory> history) {
}
}

public FlakyTestAttributes impactLevel(FlakyTestImpactLevel impactLevel) {
this.impactLevel = impactLevel;
this.unparsed |= !impactLevel.isValid();
return this;
}

/**
* The impact level of the flaky test, derived from its impact score.
*
* @return impactLevel
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IMPACT_LEVEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FlakyTestImpactLevel getImpactLevel() {
return impactLevel;
}

public void setImpactLevel(FlakyTestImpactLevel impactLevel) {
if (!impactLevel.isValid()) {
this.unparsed = true;
}
this.impactLevel = impactLevel;
}

public FlakyTestAttributes impactScore(Double impactScore) {
this.impactScore = JsonNullable.<Double>of(impactScore);
return this;
}

/**
* 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.
*
* @return impactScore
*/
@jakarta.annotation.Nullable
@JsonIgnore
public Double getImpactScore() {
return impactScore.orElse(null);
}

@JsonProperty(JSON_PROPERTY_IMPACT_SCORE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Double> getImpactScore_JsonNullable() {
return impactScore;
}

@JsonProperty(JSON_PROPERTY_IMPACT_SCORE)
public void setImpactScore_JsonNullable(JsonNullable<Double> impactScore) {
this.impactScore = impactScore;
}

public void setImpactScore(Double impactScore) {
this.impactScore = JsonNullable.<Double>of(impactScore);
}

public FlakyTestAttributes lastFlakedBranch(String lastFlakedBranch) {
this.lastFlakedBranch = lastFlakedBranch;
return this;
Expand Down Expand Up @@ -667,6 +732,8 @@ public boolean equals(Object o) {
&& Objects.equals(this.flakyCategory, flakyTestAttributes.flakyCategory)
&& Objects.equals(this.flakyState, flakyTestAttributes.flakyState)
&& Objects.equals(this.history, flakyTestAttributes.history)
&& Objects.equals(this.impactLevel, flakyTestAttributes.impactLevel)
&& Objects.equals(this.impactScore, flakyTestAttributes.impactScore)
&& Objects.equals(this.lastFlakedBranch, flakyTestAttributes.lastFlakedBranch)
&& Objects.equals(this.lastFlakedSha, flakyTestAttributes.lastFlakedSha)
&& Objects.equals(this.lastFlakedTs, flakyTestAttributes.lastFlakedTs)
Expand All @@ -692,6 +759,8 @@ public int hashCode() {
flakyCategory,
flakyState,
history,
impactLevel,
impactScore,
lastFlakedBranch,
lastFlakedSha,
lastFlakedTs,
Expand All @@ -718,6 +787,8 @@ public String toString() {
sb.append(" flakyCategory: ").append(toIndentedString(flakyCategory)).append("\n");
sb.append(" flakyState: ").append(toIndentedString(flakyState)).append("\n");
sb.append(" history: ").append(toIndentedString(history)).append("\n");
sb.append(" impactLevel: ").append(toIndentedString(impactLevel)).append("\n");
sb.append(" impactScore: ").append(toIndentedString(impactScore)).append("\n");
sb.append(" lastFlakedBranch: ").append(toIndentedString(lastFlakedBranch)).append("\n");
sb.append(" lastFlakedSha: ").append(toIndentedString(lastFlakedSha)).append("\n");
sb.append(" lastFlakedTs: ").append(toIndentedString(lastFlakedTs)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* 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 2019-Present Datadog, Inc.
*/

package com.datadog.api.client.v2.model;

import com.datadog.api.client.ModelEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/** The impact level of the flaky test, derived from its impact score. */
@JsonSerialize(using = FlakyTestImpactLevel.FlakyTestImpactLevelSerializer.class)
public class FlakyTestImpactLevel extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("low", "medium", "high"));

public static final FlakyTestImpactLevel LOW = new FlakyTestImpactLevel("low");
public static final FlakyTestImpactLevel MEDIUM = new FlakyTestImpactLevel("medium");
public static final FlakyTestImpactLevel HIGH = new FlakyTestImpactLevel("high");

FlakyTestImpactLevel(String value) {
super(value, allowedValues);
}

public static class FlakyTestImpactLevelSerializer extends StdSerializer<FlakyTestImpactLevel> {
public FlakyTestImpactLevelSerializer(Class<FlakyTestImpactLevel> t) {
super(t);
}

public FlakyTestImpactLevelSerializer() {
this(null);
}

@Override
public void serialize(
FlakyTestImpactLevel value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeObject(value.value);
}
}

@JsonCreator
public static FlakyTestImpactLevel fromValue(String value) {
return new FlakyTestImpactLevel(value);
}
}
Loading