Skip to content

Commit

Permalink
Regenerate client from commit 20461e26 of spec repo (#1841)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
  • Loading branch information
3 people committed Jan 19, 2024
1 parent 19b58e9 commit d2f33d1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-19 15:18:14.559252",
"spec_repo_commit": "b407748b"
"regenerated": "2024-01-19 16:05:44.924100",
"spec_repo_commit": "20461e26"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-19 15:18:14.573971",
"spec_repo_commit": "b407748b"
"regenerated": "2024-01-19 16:05:44.937783",
"spec_repo_commit": "20461e26"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,),
Expand All @@ -32,6 +33,7 @@ def openapi_types(_):
}

attribute_map = {
"env": "env",
"finished_at": "finished_at",
"git": "git",
"id": "id",
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -71,6 +77,8 @@ def __init__(
:param version: Version to correlate with `APM Deployment Tracking <https://docs.datadoghq.com/tracing/services/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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,),
Expand All @@ -34,6 +35,7 @@ def openapi_types(_):
}

attribute_map = {
"env": "env",
"finished_at": "finished_at",
"git": "git",
"id": "id",
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -83,6 +89,8 @@ def __init__(
:param version: Version to correlate with `APM Deployment Tracking <https://docs.datadoghq.com/tracing/services/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:
Expand Down
2 changes: 1 addition & 1 deletion tests/v2/features/dora_metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d2f33d1

Please sign in to comment.