From 093963405e6b23d3d78ee1c90b53936826914ec1 Mon Sep 17 00:00:00 2001
From: "api-clients-generation-pipeline[bot]"
 <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
Date: Fri, 13 Oct 2023 15:24:26 +0000
Subject: [PATCH] Remove beta label notice on create pipeline API endpoint
 (#2224)

Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
---
 .apigentools-info                                 |  8 ++++----
 .generator/schemas/v2/openapi.yaml                |  2 --
 api/datadog/configuration.go                      |  1 -
 api/datadogV2/api_ci_visibility_pipelines.go      |  9 ---------
 .../CreateCIAppPipelineEvent.go                   |  1 -
 .../CreateCIAppPipelineEvent_129899466.go         |  1 -
 .../features/v2/ci_visibility_pipelines.feature   | 15 +++++----------
 7 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/.apigentools-info b/.apigentools-info
index f72849f0c56..3f7fa122d02 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:45.929351",
-            "spec_repo_commit": "30a99088"
+            "regenerated": "2023-10-13 14:48:31.209305",
+            "spec_repo_commit": "9c0d47b3"
         },
         "v2": {
             "apigentools_version": "1.6.6",
-            "regenerated": "2023-10-13 08:13:45.964694",
-            "spec_repo_commit": "30a99088"
+            "regenerated": "2023-10-13 14:48:31.229549",
+            "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 29270ac85d7..6f5545f6bc4 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/api/datadog/configuration.go b/api/datadog/configuration.go
index a1b15d43c37..4ba65b363a6 100644
--- a/api/datadog/configuration.go
+++ b/api/datadog/configuration.go
@@ -323,7 +323,6 @@ func NewConfiguration() *Configuration {
 			},
 		},
 		unstableOperations: map[string]bool{
-			"v2.CreateCIAppPipelineEvent":  false,
 			"v2.ListContainerImages":       false,
 			"v2.ListEvents":                false,
 			"v2.SearchEvents":              false,
diff --git a/api/datadogV2/api_ci_visibility_pipelines.go b/api/datadogV2/api_ci_visibility_pipelines.go
index 4d86da0acfe..a0381120f9d 100644
--- a/api/datadogV2/api_ci_visibility_pipelines.go
+++ b/api/datadogV2/api_ci_visibility_pipelines.go
@@ -6,8 +6,6 @@ package datadogV2
 
 import (
 	_context "context"
-	_fmt "fmt"
-	_log "log"
 	_nethttp "net/http"
 	_neturl "net/url"
 	"time"
@@ -102,13 +100,6 @@ func (a *CIVisibilityPipelinesApi) CreateCIAppPipelineEvent(ctx _context.Context
 		localVarReturnValue interface{}
 	)
 
-	operationId := "v2.CreateCIAppPipelineEvent"
-	if a.Client.Cfg.IsUnstableOperationEnabled(operationId) {
-		_log.Printf("WARNING: Using unstable operation '%s'", operationId)
-	} else {
-		return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
-	}
-
 	localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CIVisibilityPipelinesApi.CreateCIAppPipelineEvent")
 	if err != nil {
 		return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
diff --git a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.go b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.go
index ada3454408b..9a4e5a7f82b 100644
--- a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.go
+++ b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.go
@@ -39,7 +39,6 @@ func main() {
 	}
 	ctx := datadog.NewDefaultContext(context.Background())
 	configuration := datadog.NewConfiguration()
-	configuration.SetUnstableOperationEnabled("v2.CreateCIAppPipelineEvent", true)
 	apiClient := datadog.NewAPIClient(configuration)
 	api := datadogV2.NewCIVisibilityPipelinesApi(apiClient)
 	resp, r, err := api.CreateCIAppPipelineEvent(ctx, body)
diff --git a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.go b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.go
index 4f7f9f2a560..fa2c55b66ef 100644
--- a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.go
+++ b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.go
@@ -35,7 +35,6 @@ func main() {
 	}
 	ctx := datadog.NewDefaultContext(context.Background())
 	configuration := datadog.NewConfiguration()
-	configuration.SetUnstableOperationEnabled("v2.CreateCIAppPipelineEvent", true)
 	apiClient := datadog.NewAPIClient(configuration)
 	api := datadogV2.NewCIVisibilityPipelinesApi(apiClient)
 	resp, r, err := api.CreateCIAppPipelineEvent(ctx, body)
diff --git a/tests/scenarios/features/v2/ci_visibility_pipelines.feature b/tests/scenarios/features/v2/ci_visibility_pipelines.feature
index 0b9298fd31f..6134cb06a5a 100644
--- a/tests/scenarios/features/v2/ci_visibility_pipelines.feature
+++ b/tests/scenarios/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