From 39a3b691f5da8b4d2858ca5a0e0c7567bd8bf14b Mon Sep 17 00:00:00 2001 From: dkirchan Date: Wed, 7 Feb 2024 16:21:30 +0200 Subject: [PATCH 1/5] Moved reset creds call to reset_internal_creds --- .../scripts/run_cypress/parallel_serverless.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts b/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts index a80b0d9ce15a1..12accfddd62f9 100644 --- a/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts +++ b/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts @@ -179,7 +179,7 @@ async function resetCredentials( const fetchResetCredentialsStatusAttempt = async (attemptNum: number) => { const response = await axios.post( - `${BASE_ENV_URL}/api/v1/serverless/projects/security/${projectId}/_reset-credentials`, + `${BASE_ENV_URL}/api/v1/serverless/projects/security/${projectId}/_reset_internal-credentials`, {}, { headers: { From f35fad05d6ca870572bdfc03d53cc57d28f2cfa7 Mon Sep 17 00:00:00 2001 From: dkirchan Date: Wed, 7 Feb 2024 17:02:22 +0200 Subject: [PATCH 2/5] Fixed error not to print headers - wrong endpoint --- .../scripts/run_cypress/parallel_serverless.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts b/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts index 12accfddd62f9..ece544ed836d9 100644 --- a/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts +++ b/x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts @@ -179,7 +179,7 @@ async function resetCredentials( const fetchResetCredentialsStatusAttempt = async (attemptNum: number) => { const response = await axios.post( - `${BASE_ENV_URL}/api/v1/serverless/projects/security/${projectId}/_reset_internal-credentials`, + `${BASE_ENV_URL}/api/v1/serverless/projects/security/${projectId}/_reset-internal-credentials`, {}, { headers: { @@ -199,7 +199,7 @@ async function resetCredentials( if (error instanceof AxiosError && error.code === 'ENOTFOUND') { log.info('Project is not reachable. A retry will be triggered soon..'); } else { - log.info(error); + log.error(`${error.message}`); } }, retries: 100, @@ -223,6 +223,7 @@ function waitForProjectInitialized(projectId: string, apiKey: string): Promise Date: Thu, 8 Feb 2024 15:39:43 +0100 Subject: [PATCH 3/5] fixes es_archiver issue --- .../security_solution_cypress/cypress/support/es_archiver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts b/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts index a5149b9df1e12..083b30b12ae51 100644 --- a/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts +++ b/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts @@ -22,7 +22,7 @@ export const esArchiver = ( const isCloudServerless = config.env.CLOUD_SERVERLESS; const serverlessCloudUser = { - username: 'elastic', + username: config.env.ELASTICSEARCH_USERNAME, password: config.env.ELASTICSEARCH_PASSWORD, }; From e69832dbe204f17d682c09cc9ed1dd2be62a6a83 Mon Sep 17 00:00:00 2001 From: dkirchan Date: Fri, 9 Feb 2024 16:54:37 +0200 Subject: [PATCH 4/5] Fixed reset_internal_credentials for ftr --- .../api_integration/api-integration-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh index 096709dc5da43..9bbb9aa5b7442 100755 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh @@ -51,7 +51,7 @@ KB_URL=$(echo $ENVIRONMENT_DETAILS | jq -r '.endpoints.kibana') sleep 5 # Resetting the credentials of the elastic user in the project -CREDS_BODY=$(curl -s --location --request POST "$QA_CONSOLE_URL/api/v1/serverless/projects/security/$ID/_reset-credentials" \ +CREDS_BODY=$(curl -s --location --request POST "$QA_CONSOLE_URL/api/v1/serverless/projects/security/$ID/_reset-internal-credentials" \ --header "Authorization: ApiKey $QA_API_KEY" \ --header 'Content-Type: application/json' | jq '.') USERNAME=$(echo $CREDS_BODY | jq -r '.username') From afdd14986926ca29aefadf683953ed655c3a0af9 Mon Sep 17 00:00:00 2001 From: dkirchan Date: Tue, 13 Feb 2024 16:10:05 +0200 Subject: [PATCH 5/5] Added keys to groups --- .buildkite/pipelines/security_solution/api_integration.yml | 1 + .../pipelines/security_solution/security_solution_cypress.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.buildkite/pipelines/security_solution/api_integration.yml b/.buildkite/pipelines/security_solution/api_integration.yml index fd5ec303a7c66..68fee0777775d 100644 --- a/.buildkite/pipelines/security_solution/api_integration.yml +++ b/.buildkite/pipelines/security_solution/api_integration.yml @@ -23,6 +23,7 @@ steps: limit: 2 - group: 'Execute Tests' + key: test_execution depends_on: build_image steps: - label: Running exception_workflows:qa:serverless diff --git a/.buildkite/pipelines/security_solution/security_solution_cypress.yml b/.buildkite/pipelines/security_solution/security_solution_cypress.yml index 997e607ebb43f..69ac04e1c8a23 100644 --- a/.buildkite/pipelines/security_solution/security_solution_cypress.yml +++ b/.buildkite/pipelines/security_solution/security_solution_cypress.yml @@ -24,6 +24,7 @@ steps: - group: "Execute Tests" depends_on: build_image + key: test_execution steps: # - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore # label: 'Serverless MKI QA Explore - Security Solution Cypress Tests'