diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c43341f91d8..615b42d5e76 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -161864,16 +161864,13 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Patch a deployment event by version + summary: Mark a deployment as failed by version tags: ["DORA Metrics"] x-codegen-request-body-name: body x-permission: operator: OR permissions: - dora_metrics_write - 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/). post: description: |- Use this API endpoint to get a list of deployment events. diff --git a/examples/v2/dora-metrics/PatchDORADeploymentByVersion.java b/examples/v2/dora-metrics/PatchDORADeploymentByVersion.java index 31f2f40b7db..2cb89a5f65b 100644 --- a/examples/v2/dora-metrics/PatchDORADeploymentByVersion.java +++ b/examples/v2/dora-metrics/PatchDORADeploymentByVersion.java @@ -1,4 +1,4 @@ -// Patch a deployment event by version returns "Accepted" response +// Mark a deployment as failed by version returns "Accepted" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -15,7 +15,6 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); - defaultClient.setUnstableOperationEnabled("v2.patchDORADeploymentByVersion", true); DoraMetricsApi apiInstance = new DoraMetricsApi(defaultClient); DORADeploymentPatchByVersionRequest body = diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 21161ff1cf9..7312de0558e 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1253,7 +1253,6 @@ public class ApiClient { put("v2.triggerDeploymentGatesEvaluation", false); put("v2.updateDeploymentGate", false); put("v2.updateDeploymentRule", false); - put("v2.patchDORADeploymentByVersion", false); put("v2.cloneForm", false); put("v2.createAndPublishForm", false); put("v2.createForm", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java index a9e8783f0da..1fbb7697868 100644 --- a/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java @@ -1445,7 +1445,7 @@ public CompletableFuture> patchDORADeploymentWithHttpInfoAsync } /** - * Patch a deployment event by version. + * Mark a deployment as failed by version. * *

See {@link #patchDORADeploymentByVersionWithHttpInfo}. * @@ -1458,7 +1458,7 @@ public void patchDORADeploymentByVersion(DORADeploymentPatchByVersionRequest bod } /** - * Patch a deployment event by version. + * Mark a deployment as failed by version. * *

See {@link #patchDORADeploymentByVersionWithHttpInfoAsync}. * @@ -1496,13 +1496,6 @@ public CompletableFuture patchDORADeploymentByVersionAsync( */ public ApiResponse patchDORADeploymentByVersionWithHttpInfo( DORADeploymentPatchByVersionRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "patchDORADeploymentByVersion"; - 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 @@ -1536,7 +1529,7 @@ public ApiResponse patchDORADeploymentByVersionWithHttpInfo( } /** - * Patch a deployment event by version. + * Mark a deployment as failed by version. * *

See {@link #patchDORADeploymentByVersionWithHttpInfo}. * @@ -1545,16 +1538,6 @@ public ApiResponse patchDORADeploymentByVersionWithHttpInfo( */ public CompletableFuture> patchDORADeploymentByVersionWithHttpInfoAsync( DORADeploymentPatchByVersionRequest body) { - // Check if unstable operation is enabled - String operationId = "patchDORADeploymentByVersion"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> 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 diff --git a/src/test/resources/com/datadog/api/client/v2/api/dora_metrics.feature b/src/test/resources/com/datadog/api/client/v2/api/dora_metrics.feature index 00f801653ce..f9601598d3a 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/dora_metrics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/dora_metrics.feature @@ -149,27 +149,24 @@ Feature: DORA Metrics Then the response status is 200 OK @generated @skip @team:ddoghq/ci-app-backend - Scenario: Patch a deployment event by version returns "Accepted" response + Scenario: Mark a deployment as failed by version returns "Accepted" response Given a valid "appKeyAuth" key in the system - And operation "PatchDORADeploymentByVersion" enabled And new "PatchDORADeploymentByVersion" request And body with value {"data": {"attributes": {"change_failure": true, "env": "production", "remediation": {"type": "rollback", "version": "v1.2.2"}, "service": "my-service", "version": "v1.2.3"}, "type": "dora_deployment_patch_request"}} When the request is sent Then the response status is 202 Accepted @generated @skip @team:ddoghq/ci-app-backend - Scenario: Patch a deployment event by version returns "Bad Request" response + Scenario: Mark a deployment as failed by version returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And operation "PatchDORADeploymentByVersion" enabled And new "PatchDORADeploymentByVersion" request And body with value {"data": {"attributes": {"change_failure": true, "env": "production", "remediation": {"type": "rollback", "version": "v1.2.2"}, "service": "my-service", "version": "v1.2.3"}, "type": "dora_deployment_patch_request"}} When the request is sent Then the response status is 400 Bad Request @skip @team:ddoghq/ci-app-backend - Scenario: Patch a deployment event by version with a missing version returns "Bad Request" response + Scenario: Mark a deployment as failed by version with a missing version returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And operation "PatchDORADeploymentByVersion" enabled And new "PatchDORADeploymentByVersion" request And body with value {"data": {"attributes": {"change_failure": true, "env": "production", "service": "my-service"}, "type": "dora_deployment_patch_request"}} When the request is sent