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

[SLO-3499] Remove hardcoded slo-reporter timestamps #1983

Merged
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-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
Loading