diff --git a/.apigentools-info b/.apigentools-info index 210b295cfdf3..ce5291a14538 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -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" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 29270ac85d7e..6f5545f6bc40 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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 diff --git a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb index 289c45870e27..71deaa7cb133 100644 --- a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +++ b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb @@ -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({ diff --git a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb index 7f845f903403..9fce433633c9 100644 --- a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +++ b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb @@ -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({ diff --git a/features/v2/ci_visibility_pipelines.feature b/features/v2/ci_visibility_pipelines.feature index 0b9298fd31f0..6134cb06a5af 100644 --- a/features/v2/ci_visibility_pipelines.feature +++ b/features/v2/ci_visibility_pipelines.feature @@ -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 diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index cd03e6ccc556..8e82582ab13e 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -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, diff --git a/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb b/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb index b54b54568764..72c56534d8a0 100644 --- a/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +++ b/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb @@ -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 ...'