Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing bdd tests. #2921

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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": "2025-02-04 14:10:02.073714",
"spec_repo_commit": "4fb9047a"
"regenerated": "2025-02-06 14:59:34.952200",
"spec_repo_commit": "35bc11b5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-02-04 14:10:02.090085",
"spec_repo_commit": "4fb9047a"
"regenerated": "2025-02-06 14:59:34.968375",
"spec_repo_commit": "35bc11b5"
}
}
}
8 changes: 4 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8695,7 +8695,7 @@ components:
description: Unix timestamp when the deployment finished. It must be in
nanoseconds, milliseconds, or seconds, and it should not be older than
1 hour.
example: 1693491984000000000
example: 1693491984000
format: int64
type: integer
git:
Expand All @@ -8710,7 +8710,7 @@ components:
started_at:
description: Unix timestamp when the deployment started. It must be in nanoseconds,
milliseconds, or seconds.
example: 1693491974000000000
example: 1693491974000
format: int64
type: integer
team:
Expand Down Expand Up @@ -8794,7 +8794,7 @@ components:
finished_at:
description: Unix timestamp when the incident finished. It must be in nanoseconds,
milliseconds, or seconds, and it should not be older than 1 hour.
example: 1693491984000000000
example: 1693491984000
format: int64
type: integer
git:
Expand Down Expand Up @@ -8822,7 +8822,7 @@ components:
started_at:
description: Unix timestamp when the incident started. It must be in nanoseconds,
milliseconds, or seconds.
example: 1693491974000000000
example: 1693491974000
format: int64
type: integer
team:
Expand Down
4 changes: 2 additions & 2 deletions examples/v2/dora-metrics/CreateDORADeployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ func main() {
body := datadogV2.DORADeploymentRequest{
Data: datadogV2.DORADeploymentRequestData{
Attributes: datadogV2.DORADeploymentRequestAttributes{
FinishedAt: 1693491984000000000,
FinishedAt: 1693491984000,
Git: &datadogV2.DORAGitInfo{
CommitSha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
RepositoryUrl: "https://github.com/organization/example-repository",
},
Service: "shopist",
StartedAt: 1693491974000000000,
StartedAt: 1693491974000,
Version: datadog.PtrString("v1.12.07"),
},
},
Expand Down
4 changes: 2 additions & 2 deletions examples/v2/dora-metrics/CreateDORAIncident.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
body := datadogV2.DORAIncidentRequest{
Data: datadogV2.DORAIncidentRequestData{
Attributes: datadogV2.DORAIncidentRequestAttributes{
FinishedAt: datadog.PtrInt64(1707842944600000000),
FinishedAt: datadog.PtrInt64(17078429446000),
Git: &datadogV2.DORAGitInfo{
CommitSha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
RepositoryUrl: "https://github.com/organization/example-repository",
Expand All @@ -26,7 +26,7 @@ func main() {
"shopist",
},
Severity: datadog.PtrString("High"),
StartedAt: 1707842944500000000,
StartedAt: 17078429445000,
Team: datadog.PtrString("backend"),
Version: datadog.PtrString("v1.12.07"),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v1/events
response:
body: '{"status":"ok","event":{"id":6327818702635911000,"id_str":"6327818702635911562","title":"Test-Post_an_event_returns_OK_response-1641430251","text":"A
body: '{"status":"ok","event":{"id":63278187026359,"id_str":"6327818702635911562","title":"Test-Post_an_event_returns_OK_response-1641430251","text":"A
text message.","date_happened":1641430251,"handle":null,"priority":null,"related_event_id":null,"tags":["test:TestPostaneventreturnsOKresponse1641430251"],"url":"https://app.datadoghq.com/event/event?id=6327818702635911562"}}'
code: 202
duration: 0ms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v1/events
response:
body: '{"status":"ok","event":{"id":6327818704671040000,"id_str":"6327818704671039975","title":"Test-Post_an_event_with_a_long_title_returns_OK_response-1641430251
body: '{"status":"ok","event":{"id":63278187046710,"id_str":"6327818704671039975","title":"Test-Post_an_event_with_a_long_title_returns_OK_response-1641430251
very very very looooooooong looooooooooooong loooooooooooooooooooooong looooooooooooooooooooooooooong
title with 100+ characters","text":"A text message.","date_happened":1641430252,"handle":null,"priority":null,"related_event_id":null,"tags":["test:TestPostaneventwithalongtitlereturnsOKresponse1641430251"],"url":"https://app.datadoghq.com/event/event?id=6327818704671039975"}}'
code: 202
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interactions:
response:
body: '{"data":{"id":"25442f2c-fb75-4abe-b875-ed3497d2fc2c","type":"appDefinitions","attributes":{"components":[{"events":[],"name":"grid0","properties":{"children":[{"events":[],"name":"gridCell0","properties":{"children":[{"events":[],"name":"calloutValue0","properties":{"isDisabled":false,"isLoading":false,"isVisible":true,"label":"CPU
Usage","size":"sm","style":"vivid_yellow","unit":"kB","value":"42"},"type":"calloutValue"}],"isVisible":"true","layout":{"default":{"height":8,"width":2,"x":0,"y":0}}},"type":"gridCell"}]},"type":"grid"}],"description":"This
is a simple example app","favorite":false,"name":"Example App","queries":[],"rootInstanceName":"grid0","selfService":false,"tags":[]},"meta":{"org_id":1107852,"user_id":15479137,"user_uuid":"b3f98453-b289-11ef-a4e9-d6d283f92d91","user_name":"[email protected]","version":1,"updated_since_deployment":false,"created_at":"2025-01-30T22:30:43.296595Z","updated_at":"2025-01-30T22:30:43.296595Z","deleted_at":"0001-01-01T00:00:00Z"}}}'
is a simple example app","favorite":false,"name":"Example App","queries":[],"rootInstanceName":"grid0","tags":[]}}}'
code: 200
duration: 0ms
headers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interactions:
response:
body: '{"data":{"id":"892d9225-fd31-4237-b218-e964ac33fc71","type":"appDefinitions","attributes":{"components":[{"events":[],"name":"grid0","properties":{"children":[{"events":[],"name":"gridCell0","properties":{"children":[{"events":[],"name":"calloutValue0","properties":{"isDisabled":false,"isLoading":false,"isVisible":true,"label":"CPU
Usage","size":"sm","style":"vivid_yellow","unit":"kB","value":"42"},"type":"calloutValue"}],"isVisible":"true","layout":{"default":{"height":8,"width":2,"x":0,"y":0}}},"type":"gridCell"}]},"type":"grid"}],"description":"This
is a simple example app","favorite":false,"name":"Updated Name","queries":[],"rootInstanceName":"grid0","selfService":false,"tags":[]},"meta":{"org_id":1107852,"user_id":15479137,"user_uuid":"b3f98453-b289-11ef-a4e9-d6d283f92d91","user_name":"[email protected]","version":2,"updated_since_deployment":false,"created_at":"2025-01-30T22:30:45.584607Z","updated_at":"2025-01-30T22:30:45.785438Z","deleted_at":"0001-01-01T00:00:00Z"}}}'
is a simple example app","favorite":false,"name":"Updated Name","queries":[],"rootInstanceName":"grid0","tags":[]}}}'
code: 200
duration: 0ms
headers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
body: |
{"data":{"attributes":{"finished_at":1693491984000000000,"git":{"commit_sha":"66adc9350f2cc9b250b69abddab733dd55e1a588","repository_url":"https://github.com/organization/example-repository"},"service":"shopist","started_at":1693491974000000000,"version":"v1.12.07"}}}
{"data":{"attributes":{"finished_at":1693491984000,"git":{"commit_sha":"66adc9350f2cc9b250b69abddab733dd55e1a588","repository_url":"https://github.com/organization/example-repository"},"service":"shopist","started_at":16934919740000,"version":"v1.12.07"}}}
form: {}
headers:
Accept:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
body: |
{"data":{"attributes":{"finished_at":1707842944600000000,"git":{"commit_sha":"66adc9350f2cc9b250b69abddab733dd55e1a588","repository_url":"https://github.com/organization/example-repository"},"name":"Webserver is down failing all requests","services":["shopist"],"severity":"High","started_at":1707842944500000000,"team":"backend","version":"v1.12.07"}}}
{"data":{"attributes":{"finished_at":17078429446000,"git":{"commit_sha":"66adc9350f2cc9b250b69abddab733dd55e1a588","repository_url":"https://github.com/organization/example-repository"},"name":"Webserver is down failing all requests","services":["shopist"],"severity":"High","started_at":17078429445000,"team":"backend","version":"v1.12.07"}}}
form: {}
headers:
Accept:
Expand Down
8 changes: 4 additions & 4 deletions tests/scenarios/features/v2/dora_metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Feature: DORA Metrics
Scenario: Send a deployment event for DORA Metrics returns "OK - but delayed due to incident" response
Given operation "CreateDORADeployment" enabled
And new "CreateDORADeployment" request
And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "version": "v1.12.07"}}}
And body with value {"data": {"attributes": {"finished_at": 1693491984000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000, "version": "v1.12.07"}}}
When the request is sent
Then the response status is 202 OK - but delayed due to incident

@replay-only @team:Datadog/ci-app-backend
Scenario: Send a deployment event for DORA Metrics returns "OK" response
Given operation "CreateDORADeployment" enabled
And new "CreateDORADeployment" request
And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "version": "v1.12.07"}}}
And body with value {"data": {"attributes": {"finished_at": 1693491984000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000, "version": "v1.12.07"}}}
When the request is sent
Then the response status is 200 OK

Expand All @@ -44,14 +44,14 @@ 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": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}}
And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000, "team": "backend", "version": "v1.12.07"}}}
When the request is sent
Then the response status is 202 OK - but delayed due to incident

@replay-only @team:Datadog/ci-app-backend
Scenario: Send an incident event for DORA Metrics returns "OK" response
Given operation "CreateDORAIncident" enabled
And new "CreateDORAIncident" request
And body with value {"data": {"attributes": {"finished_at": 1707842944600000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "services": ["shopist"], "severity": "High", "started_at": 1707842944500000000, "team": "backend", "version": "v1.12.07"}}}
And body with value {"data": {"attributes": {"finished_at": 17078429446000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "services": ["shopist"], "severity": "High", "started_at": 17078429445000, "team": "backend", "version": "v1.12.07"}}}
When the request is sent
Then the response status is 200 OK
Loading