Skip to content

Commit b65221d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Modifies the tests and cassettes to avoid invalid indexes (#2305)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 07f82a0 commit b65221d

17 files changed

+100
-77
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-12-05 14:55:59.677376",
8-
"spec_repo_commit": "cfc6b497"
7+
"regenerated": "2024-12-05 16:15:49.320641",
8+
"spec_repo_commit": "843392e2"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-05 14:55:59.695460",
13-
"spec_repo_commit": "cfc6b497"
12+
"regenerated": "2024-12-05 16:15:49.339022",
13+
"spec_repo_commit": "843392e2"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6414,8 +6414,8 @@ components:
64146414
description: List of indexes for the search. If not provided, the search
64156415
is performed in all indexes.
64166416
example:
6417-
- index-1
6418-
- index-2
6417+
- test-index
6418+
- test-index-2
64196419
items:
64206420
description: Individual index.
64216421
type: string
@@ -7783,14 +7783,16 @@ components:
77837783
description: List of indexes for the search. If not provided, the search
77847784
is performed in all indexes.
77857785
example:
7786-
- index-1
7787-
- index-2
7786+
- test-index
7787+
- test-index-2
77887788
items:
77897789
description: Individual index.
77907790
type: string
77917791
type: array
77927792
is_created:
7793-
description: Whether the deletion request is fully created or not.
7793+
description: Whether the deletion request is fully created or not. It can
7794+
take several minutes to fully create a deletion request depending on the
7795+
target query and timeframe.
77947796
example: true
77957797
type: boolean
77967798
org_id:
@@ -31137,8 +31139,8 @@ paths:
3113731139
x-codegen-request-body-name: body
3113831140
/api/v2/deletion/data/{product}:
3113931141
post:
31140-
description: Creates a data deletion request by providing a query and a time
31141-
frame targeting the proper data.
31142+
description: Creates a data deletion request by providing a query and a timeframe
31143+
targeting the proper data.
3114231144
operationId: CreateDataDeletionRequest
3114331145
parameters:
3114431146
- $ref: '#/components/parameters/ProductName'

examples/v2/data-deletion/CreateDataDeletionRequest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
attributes=CreateDataDeletionRequestBodyAttributes(
1616
_from=1672527600000,
1717
indexes=[
18-
"index-1",
19-
"index-2",
18+
"test-index",
19+
"test-index-2",
2020
],
2121
query=dict(
2222
host="abc",

src/datadog_api_client/v2/api/data_deletion_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def create_data_deletion_request(
146146
) -> CreateDataDeletionResponseBody:
147147
"""Creates a data deletion request.
148148
149-
Creates a data deletion request by providing a query and a time frame targeting the proper data.
149+
Creates a data deletion request by providing a query and a timeframe targeting the proper data.
150150
151151
:param product: Name of the product to be deleted, either ``logs`` or ``rum``.
152152
:type product: str

src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __init__(
8080
:param indexes: List of indexes for the search. If not provided, the search is performed in all indexes.
8181
:type indexes: [str], optional
8282
83-
:param is_created: Whether the deletion request is fully created or not.
83+
:param is_created: Whether the deletion request is fully created or not. It can take several minutes to fully create a deletion request depending on the target query and timeframe.
8484
:type is_created: bool
8585
8686
:param org_id: Organization ID.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-15T08:56:51.182Z
1+
2024-12-05T09:23:41.160Z
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-15T08:57:02.769Z
1+
2024-12-05T09:23:41.674Z

tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"from":1672527600000,"indexes":["index-1","index-2"],"query":{"host":"abc","service":"xyz"},"to":1704063600000}}}'
3+
body: '{"data":{"attributes":{"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{"host":"abc","service":"xyz"},"to":1704063600000}}}'
44
headers:
55
accept:
66
- application/json
@@ -10,8 +10,8 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/deletion/data/logs
1111
response:
1212
body:
13-
string: '{"data":{"id":"303","type":"deletion_request","attributes":{"created_at":"2024-11-15T08:57:03.242841331Z","created_by":"[email protected]","from_time":1672527600000,"indexes":["index-1","index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc
14-
service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-11-15T08:57:03.242841331Z"}},"meta":{"product":"logs"}}'
13+
string: '{"data":{"id":"523","type":"deletion_request","attributes":{"created_at":"2024-12-05T09:23:42.016613164Z","created_by":"[email protected]","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc
14+
service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-05T09:23:42.016613164Z"}},"meta":{"product":"logs"}}'
1515
headers:
1616
content-type:
1717
- application/vnd.api+json
@@ -24,11 +24,11 @@ interactions:
2424
accept:
2525
- application/json
2626
method: PUT
27-
uri: https://api.datadoghq.com/api/v2/deletion/requests/303/cancel
27+
uri: https://api.datadoghq.com/api/v2/deletion/requests/523/cancel
2828
response:
2929
body:
30-
string: '{"data":{"id":"303","type":"deletion_request","attributes":{"created_at":"2024-11-15T08:57:03.242841Z","created_by":"[email protected]","from_time":1672527600000,"indexes":["index-1","index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc
31-
service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-11-15T08:57:03.638067Z"}},"meta":{"product":"logs","request_status":"canceled"}}'
30+
string: '{"data":{"id":"523","type":"deletion_request","attributes":{"created_at":"2024-12-05T09:23:42.016613Z","created_by":"[email protected]","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc
31+
service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-05T09:23:42.384299Z"}},"meta":{"product":"logs","request_status":"canceled"}}'
3232
headers:
3333
content-type:
3434
- application/vnd.api+json
@@ -41,11 +41,11 @@ interactions:
4141
accept:
4242
- application/json
4343
method: PUT
44-
uri: https://api.datadoghq.com/api/v2/deletion/requests/303/cancel
44+
uri: https://api.datadoghq.com/api/v2/deletion/requests/523/cancel
4545
response:
4646
body:
47-
string: '{"data":{"id":"303","type":"deletion_request","attributes":{"created_at":"2024-11-15T08:57:03.242841Z","created_by":"[email protected]","from_time":1672527600000,"indexes":["index-1","index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc
48-
service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-11-15T08:57:03.936325Z"}},"meta":{"product":"logs","request_status":"canceled"}}'
47+
string: '{"data":{"id":"523","type":"deletion_request","attributes":{"created_at":"2024-12-05T09:23:42.016613Z","created_by":"[email protected]","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc
48+
service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-05T09:23:42.384299Z"}},"meta":{"product":"logs","request_status":"canceled"}}'
4949
headers:
5050
content-type:
5151
- application/vnd.api+json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-15T08:57:14.890Z
1+
2024-12-05T09:23:42.850Z
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-15T08:59:09.810Z
1+
2024-12-05T09:23:43.197Z

0 commit comments

Comments
 (0)