Skip to content

Commit

Permalink
[SLO-3499] Remove hardcoded slo-reporter timestamps (#1983)
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>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Aug 29, 2024
1 parent 4d29622 commit 49fec1e
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 33 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-08-28 20:31:00.396808",
"spec_repo_commit": "6b2f00dd"
"regenerated": "2024-08-29 20:02:08.736415",
"spec_repo_commit": "518ca9df"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-08-28 20:31:00.415198",
"spec_repo_commit": "6b2f00dd"
"regenerated": "2024-08-29 20:02:08.754668",
"spec_repo_commit": "518ca9df"
}
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-04-18T20:09:43.575Z
2024-08-29T19:53:50.818Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-04-18T20:09:43.729Z
2024-08-29T19:53:50.962Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-04-18T20:09:43.887Z
2024-08-29T19:53:51.070Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-04-18T20:09:43.972Z
2024-08-29T19:53:51.158Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-04-18T20:09:44.063Z
2024-08-29T19:53:51.260Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-04-18T20:09:44.147Z
2024-08-29T19:53:51.364Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-04-18T20:09:44.243Z
2024-08-29T19:53:51.486Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/v2/service-level-objectives/CreateSLOReportJob.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
body = DatadogAPIClient::V2::SloReportCreateRequest.new({
data: DatadogAPIClient::V2::SloReportCreateRequestData.new({
attributes: DatadogAPIClient::V2::SloReportCreateRequestAttributes.new({
from_ts: 1690901870,
to_ts: 1706803070,
from_ts: (Time.now + -40 * 86400).to_i,
to_ts: Time.now.to_i,
query: 'slo_type:metric "SLO Reporting Test"',
interval: DatadogAPIClient::V2::SLOReportInterval::MONTHLY,
timezone: "America/New_York",
Expand Down
4 changes: 2 additions & 2 deletions features/v2/service_level_objectives.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Feature: Service Level Objectives
Scenario: Create a new SLO report returns "Bad Request" response
Given operation "CreateSLOReportJob" enabled
And new "CreateSLOReportJob" request
And body with value {"data": {"attributes": {"from_ts": 1690901870, "to_ts": 1706803070, "query": "slo_type:metric \"SLO Reporting Test\"", "interval": "bad-interval"}}}
And body with value {"data": {"attributes": {"from_ts": {{ timestamp('now - 40d') }}, "to_ts": {{ timestamp('now') }}, "query": "slo_type:metric \"SLO Reporting Test\"", "interval": "bad-interval"}}}
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/slo-app
Scenario: Create a new SLO report returns "OK" response
Given operation "CreateSLOReportJob" enabled
And new "CreateSLOReportJob" request
And body with value {"data": {"attributes": {"from_ts": 1690901870, "to_ts": 1706803070, "query": "slo_type:metric \"SLO Reporting Test\"", "interval": "monthly", "timezone": "America/New_York"}}}
And body with value {"data": {"attributes": {"from_ts": {{ timestamp('now - 40d') }}, "to_ts": {{ timestamp('now') }}, "query": "slo_type:metric \"SLO Reporting Test\"", "interval": "monthly", "timezone": "America/New_York"}}}
When the request is sent
Then the response status is 200 OK
And the response "data.type" is equal to "report_id"
Expand Down

0 comments on commit 49fec1e

Please sign in to comment.