Skip to content

Commit

Permalink
Remove beta label notice on create pipeline API endpoint (#1579)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Oct 13, 2023
1 parent 5c79181 commit 2a2eaf3
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 29 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-13 08:13:40.653470",
"spec_repo_commit": "30a99088"
"regenerated": "2023-10-13 14:48:27.882671",
"spec_repo_commit": "9c0d47b3"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-13 08:13:40.675014",
"spec_repo_commit": "30a99088"
"regenerated": "2023-10-13 14:48:27.899067",
"spec_repo_commit": "9c0d47b3"
}
}
}
2 changes: 0 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19414,8 +19414,6 @@ paths:
tags:
- CI Visibility Pipelines
x-codegen-request-body-name: body
x-unstable: '**Note**: This API endpoint is in private beta. Request access
[here](https://docs.google.com/forms/d/e/1FAIpQLSdNejCvhMbdBW5nnGly1yvmYMn2Wpj4JOI0zKIiEx6O6I2dbQ/viewform).'
/api/v2/ci/pipelines/analytics/aggregate:
post:
description: Use this API endpoint to aggregate CI Visibility pipeline events
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Send pipeline event returns "Request accepted for processing" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_ci_app_pipeline_event".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CIVisibilityPipelinesAPI.new

body = DatadogAPIClient::V2::CIAppCreatePipelineEventRequest.new({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Send pipeline job event returns "Request accepted for processing" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_ci_app_pipeline_event".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CIVisibilityPipelinesAPI.new

body = DatadogAPIClient::V2::CIAppCreatePipelineEventRequest.new({
Expand Down
15 changes: 5 additions & 10 deletions features/v2/ci_visibility_pipelines.feature
Original file line number Diff line number Diff line change
Expand Up @@ -80,40 +80,35 @@ Feature: CI Visibility Pipelines

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

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

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

@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
Scenario: Send pipeline event returns "Request accepted for processing" response
Given operation "CreateCIAppPipelineEvent" enabled
And new "CreateCIAppPipelineEvent" request
Given new "CreateCIAppPipelineEvent" request
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":"john.doe@email.com"}}}, "type": "cipipeline_resource_request"}}
When the request is sent
Then the response status is 202 Request accepted for processing

@team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries
Scenario: Send pipeline job event returns "Request accepted for processing" response
Given operation "CreateCIAppPipelineEvent" enabled
And new "CreateCIAppPipelineEvent" request
Given new "CreateCIAppPipelineEvent" request
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"}}
When the request is sent
Then the response status is 202 Request accepted for processing
1 change: 0 additions & 1 deletion lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def initialize
@http_proxypass = nil
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
@unstable_operations = {
"v2.create_ci_app_pipeline_event": false,
"v2.list_container_images": false,
"v2.list_events": false,
"v2.search_events": false,
Expand Down
6 changes: 0 additions & 6 deletions lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ def create_ci_app_pipeline_event(body, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
def create_ci_app_pipeline_event_with_http_info(body, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.create_ci_app_pipeline_event".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ci_app_pipeline_event")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ci_app_pipeline_event"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: CIVisibilityPipelinesAPI.create_ci_app_pipeline_event ...'
Expand Down

0 comments on commit 2a2eaf3

Please sign in to comment.