Skip to content

Commit 0a0797f

Browse files
dd-octo-sts[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 7d68783 of spec repo (#4100)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent d634206 commit 0a0797f

5 files changed

Lines changed: 6 additions & 14 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161864,16 +161864,13 @@ paths:
161864161864
- apiKeyAuth: []
161865161865
appKeyAuth: []
161866161866
- AuthZ: []
161867-
summary: Patch a deployment event by version
161867+
summary: Mark a deployment as failed by version
161868161868
tags: ["DORA Metrics"]
161869161869
x-codegen-request-body-name: body
161870161870
x-permission:
161871161871
operator: OR
161872161872
permissions:
161873161873
- dora_metrics_write
161874-
x-unstable: |-
161875-
**Note**: This endpoint is in preview and is subject to change.
161876-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
161877161874
post:
161878161875
description: |-
161879161876
Use this API endpoint to get a list of deployment events.

‎examples/v2/dora-metrics/PatchDORADeploymentByVersion.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Patch a deployment event by version returns "Accepted" response
2+
Mark a deployment as failed by version returns "Accepted" response
33
"""
44

55
from os import environ
@@ -36,7 +36,6 @@
3636

3737
configuration = Configuration()
3838
configuration.access_token = environ["DD_BEARER_TOKEN"]
39-
configuration.unstable_operations["patch_dora_deployment_by_version"] = True
4039
with ApiClient(configuration) as api_client:
4140
api_instance = DORAMetricsApi(api_client)
4241
api_instance.patch_dora_deployment_by_version(body=body)

‎src/datadog_api_client/configuration.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ def __init__(
531531
"v2.trigger_deployment_gates_evaluation": False,
532532
"v2.update_deployment_gate": False,
533533
"v2.update_deployment_rule": False,
534-
"v2.patch_dora_deployment_by_version": False,
535534
"v2.clone_form": False,
536535
"v2.create_and_publish_form": False,
537536
"v2.create_form": False,

‎src/datadog_api_client/v2/api/dora_metrics_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def patch_dora_deployment_by_version(
458458
self,
459459
body: DORADeploymentPatchByVersionRequest,
460460
) -> None:
461-
"""Patch a deployment event by version.
461+
"""Mark a deployment as failed by version.
462462
463463
Update a deployment's change failure status, identifying the deployment by its service, environment, and version instead of its ID. Use this to mark a deployment as a change failure or back to stable. You can optionally include remediation details to enable failed deployment recovery time calculation. If multiple deployments match the given service, environment, and version, the most recently finished one is updated.
464464

‎tests/v2/features/dora_metrics.feature‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,27 +149,24 @@ Feature: DORA Metrics
149149
Then the response status is 200 OK
150150

151151
@generated @skip @team:ddoghq/ci-app-backend
152-
Scenario: Patch a deployment event by version returns "Accepted" response
152+
Scenario: Mark a deployment as failed by version returns "Accepted" response
153153
Given a valid "appKeyAuth" key in the system
154-
And operation "PatchDORADeploymentByVersion" enabled
155154
And new "PatchDORADeploymentByVersion" request
156155
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"}}
157156
When the request is sent
158157
Then the response status is 202 Accepted
159158

160159
@generated @skip @team:ddoghq/ci-app-backend
161-
Scenario: Patch a deployment event by version returns "Bad Request" response
160+
Scenario: Mark a deployment as failed by version returns "Bad Request" response
162161
Given a valid "appKeyAuth" key in the system
163-
And operation "PatchDORADeploymentByVersion" enabled
164162
And new "PatchDORADeploymentByVersion" request
165163
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"}}
166164
When the request is sent
167165
Then the response status is 400 Bad Request
168166

169167
@skip @team:ddoghq/ci-app-backend
170-
Scenario: Patch a deployment event by version with a missing version returns "Bad Request" response
168+
Scenario: Mark a deployment as failed by version with a missing version returns "Bad Request" response
171169
Given a valid "appKeyAuth" key in the system
172-
And operation "PatchDORADeploymentByVersion" enabled
173170
And new "PatchDORADeploymentByVersion" request
174171
And body with value {"data": {"attributes": {"change_failure": true, "env": "production", "service": "my-service"}, "type": "dora_deployment_patch_request"}}
175172
When the request is sent

0 commit comments

Comments
 (0)