Skip to content

Commit d92e772

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove pagination parameter from CI visibility aggregate endpoints (#1196)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent f679bd0 commit d92e772

15 files changed

+181
-63
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.4",
7-
"regenerated": "2023-01-09 17:15:10.567902",
8-
"spec_repo_commit": "9f8d1169"
7+
"regenerated": "2023-01-11 09:53:51.235905",
8+
"spec_repo_commit": "c22824fc"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-01-09 17:15:10.579860",
13-
"spec_repo_commit": "9f8d1169"
12+
"regenerated": "2023-01-11 09:53:51.251741",
13+
"spec_repo_commit": "c22824fc"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ components:
14231423
links:
14241424
$ref: '#/components/schemas/CIAppResponseLinks'
14251425
meta:
1426-
$ref: '#/components/schemas/CIAppResponseMetadata'
1426+
$ref: '#/components/schemas/CIAppResponseMetadataWithPagination'
14271427
type: object
14281428
CIAppPipelinesAggregateRequest:
14291429
description: The object sent with the request to retrieve aggregation buckets
@@ -1444,8 +1444,6 @@ components:
14441444
type: array
14451445
options:
14461446
$ref: '#/components/schemas/CIAppQueryOptions'
1447-
page:
1448-
$ref: '#/components/schemas/CIAppQueryPageOptions'
14491447
type: object
14501448
CIAppPipelinesAggregationBucketsResponse:
14511449
description: The query results.
@@ -1568,6 +1566,29 @@ components:
15681566
type: string
15691567
type: object
15701568
CIAppResponseMetadata:
1569+
description: The metadata associated with a request.
1570+
properties:
1571+
elapsed:
1572+
description: The time elapsed in milliseconds.
1573+
example: 132
1574+
format: int64
1575+
type: integer
1576+
request_id:
1577+
description: The identifier of the request.
1578+
example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR
1579+
type: string
1580+
status:
1581+
$ref: '#/components/schemas/CIAppResponseStatus'
1582+
warnings:
1583+
description: 'A list of warnings (non-fatal errors) encountered. Partial
1584+
results may return if
1585+
1586+
warnings are present in the response.'
1587+
items:
1588+
$ref: '#/components/schemas/CIAppWarning'
1589+
type: array
1590+
type: object
1591+
CIAppResponseMetadataWithPagination:
15711592
description: The metadata associated with a request.
15721593
properties:
15731594
elapsed:
@@ -1675,7 +1696,7 @@ components:
16751696
links:
16761697
$ref: '#/components/schemas/CIAppResponseLinks'
16771698
meta:
1678-
$ref: '#/components/schemas/CIAppResponseMetadata'
1699+
$ref: '#/components/schemas/CIAppResponseMetadataWithPagination'
16791700
type: object
16801701
CIAppTestsAggregateRequest:
16811702
description: The object sent with the request to retrieve aggregation buckets
@@ -1696,8 +1717,6 @@ components:
16961717
type: array
16971718
options:
16981719
$ref: '#/components/schemas/CIAppQueryOptions'
1699-
page:
1700-
$ref: '#/components/schemas/CIAppQueryPageOptions'
17011720
type: object
17021721
CIAppTestsAggregationBucketsResponse:
17031722
description: The query results.

cassettes/features/v2/ci_visibility_pipelines/Aggregate-pipelines-events-returns-OK-response.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cassettes/features/v2/ci_visibility_tests/Aggregate-tests-events-returns-OK-response.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,5 @@
2626
options: DatadogAPIClient::V2::CIAppQueryOptions.new({
2727
timezone: "GMT",
2828
}),
29-
page: DatadogAPIClient::V2::CIAppQueryPageOptions.new({
30-
limit: 25,
31-
}),
3229
})
3330
p api_instance.aggregate_ci_app_pipeline_events(body)

examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,5 @@
2929
options: DatadogAPIClient::V2::CIAppQueryOptions.new({
3030
timezone: "GMT",
3131
}),
32-
page: DatadogAPIClient::V2::CIAppQueryPageOptions.new({
33-
limit: 25,
34-
}),
3532
})
3633
p api_instance.aggregate_ci_app_test_events(body)

features/v2/ci_visibility_pipelines.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Feature: CI Visibility Pipelines
1010
@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
1111
Scenario: Aggregate pipelines events returns "Bad Request" response
1212
Given new "AggregateCIAppPipelineEvents" request
13-
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@ci.provider.name:github AND @ci.status:error", "to": "now"}, "group_by": [{"facet": "@ci.status", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}}
13+
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@ci.provider.name:github AND @ci.status:error", "to": "now"}, "group_by": [{"facet": "@ci.status", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}}
1414
When the request is sent
1515
Then the response status is 400 Bad Request
1616

1717
@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
1818
Scenario: Aggregate pipelines events returns "OK" response
1919
Given new "AggregateCIAppPipelineEvents" request
20-
And body with value {"compute": [{"aggregation": "pc90", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@ci.provider.name:(gitlab OR github)", "to": "now"}, "group_by": [{ "facet": "@ci.status", "limit": 10, "total": false}], "options": {"timezone": "GMT"}, "page": {"limit": 25}}
20+
And body with value {"compute": [{"aggregation": "pc90", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@ci.provider.name:(gitlab OR github)", "to": "now"}, "group_by": [{ "facet": "@ci.status", "limit": 10, "total": false}], "options": {"timezone": "GMT"}}
2121
When the request is sent
2222
Then the response status is 200 OK
2323

features/v2/ci_visibility_tests.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Feature: CI Visibility Tests
1010
@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
1111
Scenario: Aggregate tests events returns "Bad Request" response
1212
Given new "AggregateCIAppTestEvents" request
13-
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@test.service:web-ui-tests AND @test.status:fail", "to": "now"}, "group_by": [{"facet": "@test.service", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}}
13+
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@test.service:web-ui-tests AND @test.status:fail", "to": "now"}, "group_by": [{"facet": "@test.service", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}}
1414
When the request is sent
1515
Then the response status is 400 Bad Request
1616

1717
@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
1818
Scenario: Aggregate tests events returns "OK" response
1919
Given new "AggregateCIAppTestEvents" request
20-
And body with value {"compute": [{"aggregation": "count", "metric": "@test.is_flaky", "type": "total"}], "filter": {"from": "now-15m", "query": "@language:(python OR go)", "to": "now"}, "group_by": [{"facet": "@git.branch", "limit": 10, "sort": {"order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"limit": 25}}
20+
And body with value {"compute": [{"aggregation": "count", "metric": "@test.is_flaky", "type": "total"}], "filter": {"from": "now-15m", "query": "@language:(python OR go)", "to": "now"}, "group_by": [{"facet": "@git.branch", "limit": 10, "sort": {"order": "asc"}, "total": false}], "options": {"timezone": "GMT"}}
2121
When the request is sent
2222
Then the response status is 200 OK
2323

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,7 @@ def overrides
842842
"v2.ci_app_query_page_options" => "CIAppQueryPageOptions",
843843
"v2.ci_app_response_links" => "CIAppResponseLinks",
844844
"v2.ci_app_response_metadata" => "CIAppResponseMetadata",
845+
"v2.ci_app_response_metadata_with_pagination" => "CIAppResponseMetadataWithPagination",
845846
"v2.ci_app_response_page" => "CIAppResponsePage",
846847
"v2.ci_app_response_status" => "CIAppResponseStatus",
847848
"v2.ci_app_sort" => "CIAppSort",

lib/datadog_api_client/v2/models/ci_app_pipeline_events_response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def self.openapi_types
5050
{
5151
:'data' => :'Array<CIAppPipelineEvent>',
5252
:'links' => :'CIAppResponseLinks',
53-
:'meta' => :'CIAppResponseMetadata'
53+
:'meta' => :'CIAppResponseMetadataWithPagination'
5454
}
5555
end
5656

0 commit comments

Comments
 (0)