diff --git a/.apigentools-info b/.apigentools-info index bb1e5d2a5c5c..92b98304df70 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -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" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b995eb149b12..53b6ef61a910 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/features/v2/dora_metrics.feature b/features/v2/dora_metrics.feature index b9ae75168c54..6e52ef64fc03 100644 --- a/features/v2/dora_metrics.feature +++ b/features/v2/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 diff --git a/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb b/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb index 704b5b001548..cc9744e22e10 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb @@ -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 @@ -43,6 +46,7 @@ class DORADeploymentRequestAttributes # @!visibility private def self.attribute_map { + :'env' => :'env', :'finished_at' => :'finished_at', :'git' => :'git', :'id' => :'id', @@ -56,6 +60,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'env' => :'String', :'finished_at' => :'Integer', :'git' => :'DORAGitInfo', :'id' => :'String', @@ -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 @@ -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 && @@ -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 diff --git a/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb b/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb index ce56e5a9679a..3ea83e92a280 100644 --- a/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb @@ -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 @@ -49,6 +52,7 @@ class DORAIncidentRequestAttributes # @!visibility private def self.attribute_map { + :'env' => :'env', :'finished_at' => :'finished_at', :'git' => :'git', :'id' => :'id', @@ -64,6 +68,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'env' => :'String', :'finished_at' => :'Integer', :'git' => :'DORAGitInfo', :'id' => :'String', @@ -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 @@ -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 && @@ -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