diff --git a/.apigentools-info b/.apigentools-info
index d203a76559..73678e55e0 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
- "regenerated": "2024-01-18 23:59:52.072244",
- "spec_repo_commit": "7dba000a"
+ "regenerated": "2024-01-19 15:56:55.834856",
+ "spec_repo_commit": "9e5e391d"
},
"v2": {
"apigentools_version": "1.6.6",
- "regenerated": "2024-01-18 23:59:52.086183",
- "spec_repo_commit": "7dba000a"
+ "regenerated": "2024-01-19 15:56:55.886133",
+ "spec_repo_commit": "9e5e391d"
}
}
}
\ No newline at end of file
diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index b995eb149b..53b6ef61a9 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -4930,6 +4930,10 @@ components:
DORADeploymentRequestAttributes:
description: Attributes to create a DORA deployment event.
properties:
+ env:
+ description: Environment name to where the service was deployed.
+ example: staging
+ type: string
finished_at:
description: Unix timestamp in nanoseconds when the deployment finished.
It should not be older than 3 hours.
@@ -5018,6 +5022,10 @@ components:
DORAIncidentRequestAttributes:
description: Attributes to create a DORA incident event.
properties:
+ env:
+ description: Environment name that was impacted by the incident.
+ example: staging
+ type: string
finished_at:
description: Unix timestamp in nanoseconds when the incident finished. It
should not be older than 3 hours.
diff --git a/src/datadog_api_client/v2/model/dora_deployment_request_attributes.py b/src/datadog_api_client/v2/model/dora_deployment_request_attributes.py
index c38e191879..20402e047e 100644
--- a/src/datadog_api_client/v2/model/dora_deployment_request_attributes.py
+++ b/src/datadog_api_client/v2/model/dora_deployment_request_attributes.py
@@ -23,6 +23,7 @@ def openapi_types(_):
from datadog_api_client.v2.model.dora_git_info import DORAGitInfo
return {
+ "env": (str,),
"finished_at": (int,),
"git": (DORAGitInfo,),
"id": (str,),
@@ -32,6 +33,7 @@ def openapi_types(_):
}
attribute_map = {
+ "env": "env",
"finished_at": "finished_at",
"git": "git",
"id": "id",
@@ -45,6 +47,7 @@ def __init__(
finished_at: int,
service: str,
started_at: int,
+ env: Union[str, UnsetType] = unset,
git: Union[DORAGitInfo, UnsetType] = unset,
id: Union[str, UnsetType] = unset,
version: Union[str, UnsetType] = unset,
@@ -53,6 +56,9 @@ def __init__(
"""
Attributes to create a DORA deployment event.
+ :param env: Environment name to where the service was deployed.
+ :type env: str, optional
+
:param finished_at: Unix timestamp in nanoseconds when the deployment finished. It should not be older than 3 hours.
:type finished_at: int
@@ -71,6 +77,8 @@ def __init__(
:param version: Version to correlate with `APM Deployment Tracking `_.
:type version: str, optional
"""
+ if env is not unset:
+ kwargs["env"] = env
if git is not unset:
kwargs["git"] = git
if id is not unset:
diff --git a/src/datadog_api_client/v2/model/dora_incident_request_attributes.py b/src/datadog_api_client/v2/model/dora_incident_request_attributes.py
index 9709593d6d..bdfd47cb10 100644
--- a/src/datadog_api_client/v2/model/dora_incident_request_attributes.py
+++ b/src/datadog_api_client/v2/model/dora_incident_request_attributes.py
@@ -23,6 +23,7 @@ def openapi_types(_):
from datadog_api_client.v2.model.dora_git_info import DORAGitInfo
return {
+ "env": (str,),
"finished_at": (int,),
"git": (DORAGitInfo,),
"id": (str,),
@@ -34,6 +35,7 @@ def openapi_types(_):
}
attribute_map = {
+ "env": "env",
"finished_at": "finished_at",
"git": "git",
"id": "id",
@@ -48,6 +50,7 @@ def __init__(
self_,
service: str,
started_at: int,
+ env: Union[str, UnsetType] = unset,
finished_at: Union[int, UnsetType] = unset,
git: Union[DORAGitInfo, UnsetType] = unset,
id: Union[str, UnsetType] = unset,
@@ -59,6 +62,9 @@ def __init__(
"""
Attributes to create a DORA incident event.
+ :param env: Environment name that was impacted by the incident.
+ :type env: str, optional
+
:param finished_at: Unix timestamp in nanoseconds when the incident finished. It should not be older than 3 hours.
:type finished_at: int, optional
@@ -83,6 +89,8 @@ def __init__(
:param version: Version to correlate with `APM Deployment Tracking `_.
:type version: str, optional
"""
+ if env is not unset:
+ kwargs["env"] = env
if finished_at is not unset:
kwargs["finished_at"] = finished_at
if git is not unset:
diff --git a/tests/v2/features/dora_metrics.feature b/tests/v2/features/dora_metrics.feature
index b9ae75168c..6e52ef64fc 100644
--- a/tests/v2/features/dora_metrics.feature
+++ b/tests/v2/features/dora_metrics.feature
@@ -42,7 +42,7 @@ Feature: DORA Metrics
Scenario: Send an incident event for DORA Metrics returns "OK - but delayed due to incident" response
Given operation "CreateDORAIncident" enabled
And new "CreateDORAIncident" request
- And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "service": "shopist", "severity": "High", "started_at": 1693491974000000000, "version": "v1.12.07"}}}
+ And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "service": "shopist", "severity": "High", "started_at": 1693491974000000000, "version": "v1.12.07"}}}
When the request is sent
Then the response status is 202 OK - but delayed due to incident