Skip to content
Merged
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
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:10.917989",
"spec_repo_commit": "b407748b"
"regenerated": "2024-01-19 16:05:46.039191",
"spec_repo_commit": "20461e26"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-19 15:18:10.933129",
"spec_repo_commit": "b407748b"
"regenerated": "2024-01-19 16:05:46.061397",
"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
2 changes: 1 addition & 1 deletion features/v2/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
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module DatadogAPIClient::V2
class DORADeploymentRequestAttributes
include BaseGenericModel

# Environment name to where the service was deployed.
attr_accessor :env

# Unix timestamp in nanoseconds when the deployment finished. It should not be older than 3 hours.
attr_reader :finished_at

Expand All @@ -43,6 +46,7 @@ class DORADeploymentRequestAttributes
# @!visibility private
def self.attribute_map
{
:'env' => :'env',
:'finished_at' => :'finished_at',
:'git' => :'git',
:'id' => :'id',
Expand All @@ -56,6 +60,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'env' => :'String',
:'finished_at' => :'Integer',
:'git' => :'DORAGitInfo',
:'id' => :'String',
Expand All @@ -81,6 +86,10 @@ def initialize(attributes = {})
h[k.to_sym] = v
}

if attributes.key?(:'env')
self.env = attributes[:'env']
end

if attributes.key?(:'finished_at')
self.finished_at = attributes[:'finished_at']
end
Expand Down Expand Up @@ -152,6 +161,7 @@ def started_at=(started_at)
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
env == o.env &&
finished_at == o.finished_at &&
git == o.git &&
id == o.id &&
Expand All @@ -164,7 +174,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[finished_at, git, id, service, started_at, version].hash
[env, finished_at, git, id, service, started_at, version].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module DatadogAPIClient::V2
class DORAIncidentRequestAttributes
include BaseGenericModel

# Environment name that was impacted by the incident.
attr_accessor :env

# Unix timestamp in nanoseconds when the incident finished. It should not be older than 3 hours.
attr_accessor :finished_at

Expand Down Expand Up @@ -49,6 +52,7 @@ class DORAIncidentRequestAttributes
# @!visibility private
def self.attribute_map
{
:'env' => :'env',
:'finished_at' => :'finished_at',
:'git' => :'git',
:'id' => :'id',
Expand All @@ -64,6 +68,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'env' => :'String',
:'finished_at' => :'Integer',
:'git' => :'DORAGitInfo',
:'id' => :'String',
Expand Down Expand Up @@ -91,6 +96,10 @@ def initialize(attributes = {})
h[k.to_sym] = v
}

if attributes.key?(:'env')
self.env = attributes[:'env']
end

if attributes.key?(:'finished_at')
self.finished_at = attributes[:'finished_at']
end
Expand Down Expand Up @@ -159,6 +168,7 @@ def started_at=(started_at)
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
env == o.env &&
finished_at == o.finished_at &&
git == o.git &&
id == o.id &&
Expand All @@ -173,7 +183,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[finished_at, git, id, name, service, severity, started_at, version].hash
[env, finished_at, git, id, name, service, severity, started_at, version].hash
end
end
end