Skip to content

Commit 658ea6e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b7e9aa0 of spec repo
1 parent 71db329 commit 658ea6e

File tree

7 files changed

+30
-29
lines changed

7 files changed

+30
-29
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25661,6 +25661,17 @@ components:
2566125661
FlakyTestsSearchFilter:
2566225662
description: Search filter settings.
2566325663
properties:
25664+
include_history:
25665+
default: false
25666+
description: 'Whether to include the status change history for each flaky
25667+
test in the response.
25668+
25669+
When set to true, each test will include a ''history'' array with chronological
25670+
status changes.
25671+
25672+
Defaults to false.'
25673+
example: true
25674+
type: boolean
2566425675
query:
2566525676
default: '*'
2566625677
description: 'Search query following log syntax used to filter flaky tests,
@@ -25716,17 +25727,6 @@ components:
2571625727
properties:
2571725728
filter:
2571825729
$ref: '#/components/schemas/FlakyTestsSearchFilter'
25719-
include_history:
25720-
default: false
25721-
description: 'Whether to include the status change history for each flaky
25722-
test in the response.
25723-
25724-
When set to true, each test will include a `history` array with chronological
25725-
status changes.
25726-
25727-
Defaults to false.'
25728-
example: true
25729-
type: boolean
2573025730
page:
2573125731
$ref: '#/components/schemas/FlakyTestsSearchPageOptions'
2573225732
sort:

examples/v2/test-optimization/SearchFlakyTests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
data=FlakyTestsSearchRequestData(
1717
attributes=FlakyTestsSearchRequestAttributes(
1818
filter=FlakyTestsSearchFilter(
19+
include_history=True,
1920
query='flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
2021
),
21-
include_history=True,
2222
page=FlakyTestsSearchPageOptions(
2323
cursor="eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
2424
limit=25,

examples/v2/test-optimization/SearchFlakyTests_1224086727.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
data=FlakyTestsSearchRequestData(
1717
attributes=FlakyTestsSearchRequestAttributes(
1818
filter=FlakyTestsSearchFilter(
19+
include_history=True,
1920
query='flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
2021
),
21-
include_history=True,
2222
page=FlakyTestsSearchPageOptions(
2323
cursor="eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
2424
limit=25,

examples/v2/test-optimization/SearchFlakyTests_209064879.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
attributes=FlakyTestsSearchRequestAttributes(
1818
filter=FlakyTestsSearchFilter(
1919
query='flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
20+
include_history=True,
2021
),
2122
page=FlakyTestsSearchPageOptions(
2223
limit=10,
2324
),
2425
sort=FlakyTestsSearchSort.FQN_ASCENDING,
25-
include_history=True,
2626
),
2727
type=FlakyTestsSearchRequestDataType.SEARCH_FLAKY_TESTS_REQUEST,
2828
),

src/datadog_api_client/v2/model/flaky_tests_search_filter.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,26 @@ class FlakyTestsSearchFilter(ModelNormal):
1717
@cached_property
1818
def openapi_types(_):
1919
return {
20+
"include_history": (bool,),
2021
"query": (str,),
2122
}
2223

2324
attribute_map = {
25+
"include_history": "include_history",
2426
"query": "query",
2527
}
2628

27-
def __init__(self_, query: Union[str, UnsetType] = unset, **kwargs):
29+
def __init__(
30+
self_, include_history: Union[bool, UnsetType] = unset, query: Union[str, UnsetType] = unset, **kwargs
31+
):
2832
"""
2933
Search filter settings.
3034
35+
:param include_history: Whether to include the status change history for each flaky test in the response.
36+
When set to true, each test will include a 'history' array with chronological status changes.
37+
Defaults to false.
38+
:type include_history: bool, optional
39+
3140
:param query: Search query following log syntax used to filter flaky tests, same as on Flaky Tests Management UI. The supported search keys are:
3241
3342
* ``flaky_test_state``
@@ -42,6 +51,8 @@ def __init__(self_, query: Union[str, UnsetType] = unset, **kwargs):
4251
* ``env``
4352
:type query: str, optional
4453
"""
54+
if include_history is not unset:
55+
kwargs["include_history"] = include_history
4556
if query is not unset:
4657
kwargs["query"] = query
4758
super().__init__(kwargs)

src/datadog_api_client/v2/model/flaky_tests_search_request_attributes.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,19 @@ def openapi_types(_):
2828

2929
return {
3030
"filter": (FlakyTestsSearchFilter,),
31-
"include_history": (bool,),
3231
"page": (FlakyTestsSearchPageOptions,),
3332
"sort": (FlakyTestsSearchSort,),
3433
}
3534

3635
attribute_map = {
3736
"filter": "filter",
38-
"include_history": "include_history",
3937
"page": "page",
4038
"sort": "sort",
4139
}
4240

4341
def __init__(
4442
self_,
4543
filter: Union[FlakyTestsSearchFilter, UnsetType] = unset,
46-
include_history: Union[bool, UnsetType] = unset,
4744
page: Union[FlakyTestsSearchPageOptions, UnsetType] = unset,
4845
sort: Union[FlakyTestsSearchSort, UnsetType] = unset,
4946
**kwargs,
@@ -54,11 +51,6 @@ def __init__(
5451
:param filter: Search filter settings.
5552
:type filter: FlakyTestsSearchFilter, optional
5653
57-
:param include_history: Whether to include the status change history for each flaky test in the response.
58-
When set to true, each test will include a ``history`` array with chronological status changes.
59-
Defaults to false.
60-
:type include_history: bool, optional
61-
6254
:param page: Pagination attributes for listing flaky tests.
6355
:type page: FlakyTestsSearchPageOptions, optional
6456
@@ -67,8 +59,6 @@ def __init__(
6759
"""
6860
if filter is not unset:
6961
kwargs["filter"] = filter
70-
if include_history is not unset:
71-
kwargs["include_history"] = include_history
7262
if page is not unset:
7363
kwargs["page"] = page
7464
if sort is not unset:

tests/v2/features/test_optimization.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: Test Optimization
1313
Scenario: Search flaky tests returns "Bad Request" response
1414
Given operation "SearchFlakyTests" enabled
1515
And new "SearchFlakyTests" request
16-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "include_history": true, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
16+
And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
1717
When the request is sent
1818
Then the response status is 400 Bad Request
1919

@@ -29,7 +29,7 @@ Feature: Test Optimization
2929
Scenario: Search flaky tests returns "OK" response
3030
Given operation "SearchFlakyTests" enabled
3131
And new "SearchFlakyTests" request
32-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "include_history": true, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
32+
And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
3333
When the request is sent
3434
Then the response status is 200 OK
3535

@@ -45,7 +45,7 @@ Feature: Test Optimization
4545
Scenario: Search flaky tests returns "OK" response with history
4646
Given operation "SearchFlakyTests" enabled
4747
And new "SearchFlakyTests" request
48-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"limit": 10}, "sort": "fqn", "include_history": true}, "type": "search_flaky_tests_request"}}
48+
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\"", "include_history": true}, "page": {"limit": 10}, "sort": "fqn"}, "type": "search_flaky_tests_request"}}
4949
When the request is sent
5050
Then the response status is 200 OK
5151
And the response "data[0].attributes" has field "history"
@@ -57,7 +57,7 @@ Feature: Test Optimization
5757
Scenario: Search flaky tests returns "OK" response with pagination
5858
Given operation "SearchFlakyTests" enabled
5959
And new "SearchFlakyTests" request
60-
And body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "include_history": true, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
60+
And body with value {"data": {"attributes": {"filter": {"include_history": true, "query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
6161
When the request with pagination is sent
6262
Then the response status is 200 OK
6363

0 commit comments

Comments
 (0)