diff --git a/.github/workflows/go-e2e.yaml b/.github/workflows/go-e2e.yaml index 73483cad..894fc792 100644 --- a/.github/workflows/go-e2e.yaml +++ b/.github/workflows/go-e2e.yaml @@ -1,7 +1,7 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -name: Golang E2e Tests +name: GMC E2e Tests on: pull_request: @@ -9,6 +9,7 @@ on: types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: - microservices-connector/** + - manifests/** workflow_dispatch: # If there is a new commit, the previous jobs will be canceled @@ -43,10 +44,10 @@ jobs: make docker.build make docker.push - - name: Install modules + - name: Install GMC run: | echo "should_cleanup=true" >> $GITHUB_ENV - .github/workflows/scripts/e2e/go_test.sh install_gmc + .github/workflows/scripts/e2e/gmc_test.sh install_gmc exit_status=$$?$$ if [ $$exit_status -ne 0 ]; then echo "Failed to install modules" @@ -60,12 +61,12 @@ jobs: if $skip_validate; then echo "Skip validate" else - .github/workflows/scripts/e2e/go_test.sh validate_gmc + .github/workflows/scripts/e2e/gmc_test.sh validate_gmc fi - name: Cleanup modules if: always() run: | if $should_cleanup; then - .github/workflows/scripts/e2e/go_test.sh cleanup_gmc + .github/workflows/scripts/e2e/gmc_test.sh cleanup_gmc fi diff --git a/.github/workflows/scripts/e2e/go_test.sh b/.github/workflows/scripts/e2e/gmc_test.sh similarity index 94% rename from .github/workflows/scripts/e2e/go_test.sh rename to .github/workflows/scripts/e2e/gmc_test.sh index 6654da52..86a4aacb 100755 --- a/.github/workflows/scripts/e2e/go_test.sh +++ b/.github/workflows/scripts/e2e/gmc_test.sh @@ -22,6 +22,7 @@ function install_gmc() { # Wait until the gmc controller pod is ready wait_until_pod_ready "gmc-controller" $SYSTEM_NAMESPACE "gmc-controller" + kubectl get pods -n $SYSTEM_NAMESPACE } function validate_gmc() { @@ -42,20 +43,16 @@ function cleanup_gmc() { function validate_chatqna() { - kubectl get pods -n $SYSTEM_NAMESPACE # todo select gaudi or xeon kubectl create ns $APP_NAMESPACE sed -i "s|namespace: chatqa|namespace: $APP_NAMESPACE|g" $(pwd)/config/samples/chatQnA_xeon.yaml kubectl apply -f $(pwd)/config/samples/chatQnA_xeon.yaml - - - output=$(kubectl get pods) - echo $output - # Wait until the router service is ready echo "Waiting for the chatqa router service to be ready..." wait_until_pod_ready "chatqna router" $APP_NAMESPACE "router-service" + output=$(kubectl get pods -n $APP_NAMESPACE) + echo $output # Wait until the tgi pod is ready TGI_POD_NAME=$(kubectl get pods --namespace=$APP_NAMESPACE | grep ^tgi-service | awk '{print $1}') @@ -70,6 +67,7 @@ function validate_chatqna() { wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test" # giving time to populating data sleep 120 + kubectl get pods -n $APP_NAMESPACE # send request to chatqnA export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name}) @@ -123,10 +121,9 @@ function init_gmc() { find . -name '*.yaml' -type f -exec sed -i "s#default.svc#$APP_NAMESPACE.svc#g" {} \; } - function wait_until_pod_ready() { echo "Waiting for the $1 to be ready..." - max_retries=3000 + max_retries=30 retry_count=0 while ! is_pod_ready $2 $3; do if [ $retry_count -ge $max_retries ]; then @@ -136,14 +133,7 @@ function wait_until_pod_ready() { echo "$1 is not ready yet. Retrying in 10 seconds..." sleep 10 output=$(kubectl get pods -n $2) - # Check if the command was successful - if [ $? -eq 0 ]; then - echo "Successfully retrieved $1 information:" - echo "$output" - else - echo "Failed to retrieve $1 information" - exit 1 - fi + echo $output retry_count=$((retry_count + 1)) done } @@ -161,8 +151,6 @@ function is_pod_ready() { fi } - - if [ $# -eq 0 ]; then echo "Usage: $0 " exit 1 diff --git a/microservices-connector/personas.png b/microservices-connector/personas.png index 4f841c3c..752942b0 100644 Binary files a/microservices-connector/personas.png and b/microservices-connector/personas.png differ