Skip to content

Commit 45c4c4d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Beta Banner to Send Pipeline Events Endpoint (#1737)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 859f8eb commit 45c4c4d

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
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": "2023-10-27 07:36:48.282560",
8-
"spec_repo_commit": "2204d6df"
7+
"regenerated": "2023-10-27 08:09:54.577931",
8+
"spec_repo_commit": "86d56f2b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-27 07:36:48.296883",
13-
"spec_repo_commit": "2204d6df"
12+
"regenerated": "2023-10-27 08:09:54.592108",
13+
"spec_repo_commit": "86d56f2b"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19705,6 +19705,9 @@ paths:
1970519705
tags:
1970619706
- CI Visibility Pipelines
1970719707
x-codegen-request-body-name: body
19708+
x-unstable: '**Note:** This endpoint is in public beta.
19709+
19710+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
1970819711
/api/v2/ci/pipelines/analytics/aggregate:
1970919712
post:
1971019713
description: Use this API endpoint to aggregate CI Visibility pipeline events

examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
)
4444

4545
configuration = Configuration()
46+
configuration.unstable_operations["create_ci_app_pipeline_event"] = True
4647
with ApiClient(configuration) as api_client:
4748
api_instance = CIVisibilityPipelinesApi(api_client)
4849
response = api_instance.create_ci_app_pipeline_event(body=body)

examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
)
3939

4040
configuration = Configuration()
41+
configuration.unstable_operations["create_ci_app_pipeline_event"] = True
4142
with ApiClient(configuration) as api_client:
4243
api_instance = CIVisibilityPipelinesApi(api_client)
4344
response = api_instance.create_ci_app_pipeline_event(body=body)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ def __init__(
236236
# Keep track of unstable operations
237237
self.unstable_operations = _UnstableOperations(
238238
{
239+
"v2.create_ci_app_pipeline_event": False,
239240
"v2.list_container_images": False,
240241
"v2.list_containers": False,
241242
"v2.list_events": False,

tests/v2/features/ci_visibility_pipelines.feature

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,35 +80,40 @@ Feature: CI Visibility Pipelines
8080

8181
@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
8282
Scenario: Send pipeline event returns "Bad Request" response
83-
Given new "CreateCIAppPipelineEvent" request
83+
Given operation "CreateCIAppPipelineEvent" enabled
84+
And new "CreateCIAppPipelineEvent" request
8485
And body with value {"data": {"attributes": {"resource": "Details TBD"}, "type": "cipipeline_resource_request"}}
8586
When the request is sent
8687
Then the response status is 400 Bad Request
8788

8889
@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
8990
Scenario: Send pipeline event returns "Payload Too Large" response
90-
Given new "CreateCIAppPipelineEvent" request
91+
Given operation "CreateCIAppPipelineEvent" enabled
92+
And new "CreateCIAppPipelineEvent" request
9193
And body with value {"data": {"attributes": {"resource": "Details TBD"}, "type": "cipipeline_resource_request"}}
9294
When the request is sent
9395
Then the response status is 413 Payload Too Large
9496

9597
@generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
9698
Scenario: Send pipeline event returns "Request Timeout" response
97-
Given new "CreateCIAppPipelineEvent" request
99+
Given operation "CreateCIAppPipelineEvent" enabled
100+
And new "CreateCIAppPipelineEvent" request
98101
And body with value {"data": {"attributes": {"resource": "Details TBD"}, "type": "cipipeline_resource_request"}}
99102
When the request is sent
100103
Then the response status is 408 Request Timeout
101104

102105
@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
103106
Scenario: Send pipeline event returns "Request accepted for processing" response
104-
Given new "CreateCIAppPipelineEvent" request
107+
Given operation "CreateCIAppPipelineEvent" enabled
108+
And new "CreateCIAppPipelineEvent" request
105109
And body with value {"data": {"attributes": {"resource": {"end": "{{ timeISO('now - 30s') }}", "level": "pipeline", "name": "Deploy to AWS", "partial_retry": false, "start": "{{ timeISO('now - 120s') }}", "status": "success", "unique_id": "3eacb6f3-ff04-4e10-8a9c-46e6d054024a", "url": "https://my-ci-provider.example/pipelines/my-pipeline/run/1","git":{"repository_url":"https://github.com/DataDog/datadog-agent","sha":"7f263865994b76066c4612fd1965215e7dcb4cd2","author_email":"[email protected]"}}}, "type": "cipipeline_resource_request"}}
106110
When the request is sent
107111
Then the response status is 202 Request accepted for processing
108112

109113
@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
110114
Scenario: Send pipeline job event returns "Request accepted for processing" response
111-
Given new "CreateCIAppPipelineEvent" request
115+
Given operation "CreateCIAppPipelineEvent" enabled
116+
And new "CreateCIAppPipelineEvent" request
112117
And body with value {"data": {"attributes": {"resource": {"end": "{{ timeISO('now - 30s') }}", "level": "job", "name": "Build image", "start": "{{ timeISO('now - 120s') }}", "status": "error", "id": "cf9456de-8b9e-4c27-aa79-27b1e78c1a33", "pipeline_unique_id": "3eacb6f3-ff04-4e10-8a9c-46e6d054024a", "pipeline_name": "Deploy to AWS", "url": "https://my-ci-provider.example/jobs/my-jobs/run/1"}}, "type": "cipipeline_resource_request"}}
113118
When the request is sent
114119
Then the response status is 202 Request accepted for processing

0 commit comments

Comments
 (0)