Skip to content

Commit 61e9ce7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove pagination parameter from CI visibility aggregate endpoints (#975)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 0f3778d commit 61e9ce7

File tree

16 files changed

+124
-57
lines changed

16 files changed

+124
-57
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:14.101086",
8-
"spec_repo_commit": "9f8d1169"
7+
"regenerated": "2023-01-11 09:53:49.785215",
8+
"spec_repo_commit": "c22824fc"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-01-09 17:15:14.116260",
13-
"spec_repo_commit": "9f8d1169"
12+
"regenerated": "2023-01-11 09:53:49.795808",
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/v2/CI-Visibility-Pipelines_2492627744/Aggregate-pipelines-events-returns-OK-response_454816794/recording.har

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "a2f719c1d23b81213c7185d0426ee0c9",
11+
"_id": "8aca276f92104126d1965f116fa2418d",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,7 +32,7 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"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}}"
35+
"text": "{\"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\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/ci/pipelines/analytics/aggregate"

cassettes/v2/CI-Visibility-Tests_768312914/Aggregate-tests-events-returns-OK-response_3931304892/recording.har

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "5b12751f40e7ea16c44e3175b516a9cc",
11+
"_id": "272d6a089b991c8e2c3f91de054ff118",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,7 +32,7 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"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}}"
35+
"text": "{\"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\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/ci/tests/analytics/aggregate"

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ const params: v2.CIVisibilityPipelinesApiAggregateCIAppPipelineEventsRequest = {
3131
options: {
3232
timezone: "GMT",
3333
},
34-
page: {
35-
limit: 25,
36-
},
3734
},
3835
};
3936

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ const params: v2.CIVisibilityTestsApiAggregateCIAppTestEventsRequest = {
3434
options: {
3535
timezone: "GMT",
3636
},
37-
page: {
38-
limit: 25,
39-
},
4037
},
4138
};
4239

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

packages/datadog-api-client-v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ export { CIAppQueryOptions } from "./models/CIAppQueryOptions";
352352
export { CIAppQueryPageOptions } from "./models/CIAppQueryPageOptions";
353353
export { CIAppResponseLinks } from "./models/CIAppResponseLinks";
354354
export { CIAppResponseMetadata } from "./models/CIAppResponseMetadata";
355+
export { CIAppResponseMetadataWithPagination } from "./models/CIAppResponseMetadataWithPagination";
355356
export { CIAppResponsePage } from "./models/CIAppResponsePage";
356357
export { CIAppResponseStatus } from "./models/CIAppResponseStatus";
357358
export { CIAppSort } from "./models/CIAppSort";

packages/datadog-api-client-v2/models/CIAppPipelineEventsResponse.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
import { CIAppPipelineEvent } from "./CIAppPipelineEvent";
77
import { CIAppResponseLinks } from "./CIAppResponseLinks";
8-
import { CIAppResponseMetadata } from "./CIAppResponseMetadata";
8+
import { CIAppResponseMetadataWithPagination } from "./CIAppResponseMetadataWithPagination";
99

1010
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1111

@@ -24,7 +24,7 @@ export class CIAppPipelineEventsResponse {
2424
/**
2525
* The metadata associated with a request.
2626
*/
27-
"meta"?: CIAppResponseMetadata;
27+
"meta"?: CIAppResponseMetadataWithPagination;
2828

2929
/**
3030
* @ignore
@@ -45,7 +45,7 @@ export class CIAppPipelineEventsResponse {
4545
},
4646
meta: {
4747
baseName: "meta",
48-
type: "CIAppResponseMetadata",
48+
type: "CIAppResponseMetadataWithPagination",
4949
},
5050
};
5151

0 commit comments

Comments
 (0)