From 754d59ea2324dbbc676ab0ba6d4dcafec27321ac Mon Sep 17 00:00:00 2001 From: Tharsanan1 Date: Thu, 12 Feb 2026 12:03:27 +0530 Subject: [PATCH 1/3] Improve config dump error response messaging --- gateway/gateway-controller/pkg/api/handlers/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/gateway-controller/pkg/api/handlers/handlers.go b/gateway/gateway-controller/pkg/api/handlers/handlers.go index 7a7149260..416b724c1 100644 --- a/gateway/gateway-controller/pkg/api/handlers/handlers.go +++ b/gateway/gateway-controller/pkg/api/handlers/handlers.go @@ -2159,7 +2159,7 @@ func (s *APIServer) GetConfigDump(c *gin.Context) { log.Error("Failed to retrieve configuration dump", slog.Any("error", err)) c.JSON(http.StatusInternalServerError, api.ErrorResponse{ Status: "error", - Message: "Failed to retrieve certificates", + Message: err.Error(), }) return } From e0e5215693e6c3bd10c797788d0c4b75b5944eaa Mon Sep 17 00:00:00 2001 From: Tharsanan1 Date: Thu, 12 Feb 2026 12:20:14 +0530 Subject: [PATCH 2/3] Optimize gateway integration tests by parallelizing mock builds and test execution --- .../workflows/gateway-integration-test.yml | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gateway-integration-test.yml b/.github/workflows/gateway-integration-test.yml index 52927c077..c23adaeda 100644 --- a/.github/workflows/gateway-integration-test.yml +++ b/.github/workflows/gateway-integration-test.yml @@ -12,6 +12,10 @@ on: jobs: integration-test: runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + group: [1, 2, 3, 4] steps: - name: Checkout code uses: actions/checkout@v4 @@ -20,6 +24,7 @@ jobs: uses: actions/setup-go@v5 with: go-version: '1.25' + cache: true - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -27,25 +32,44 @@ jobs: - name: Build coverage-instrumented images run: | cd gateway + # Use cache-from and cache-to for faster builds in subsequent runs + export DOCKER_METADATA_OUTPUT_JSON='{"tags":["test"],"labels":{"org.opencontainers.image.version":"test"}}' make build-coverage VERSION=test - name: Build mock server images run: | - for mock in mock-jwks mock-azure-content-safety mock-aws-bedrock-guardrail mock-embedding-provider mock-analytics-collector; do + mocks=("mock-jwks" "mock-azure-content-safety" "mock-aws-bedrock-guardrail" "mock-embedding-provider" "mock-analytics-collector") + for mock in "${mocks[@]}"; do echo "Building $mock..." - docker build -t ghcr.io/wso2/api-platform/$mock:latest tests/mock-servers/$mock + docker build -t ghcr.io/wso2/api-platform/$mock:latest tests/mock-servers/$mock & done + wait + echo "All mock images built." - - name: Run integration tests + - name: Run integration tests (Group ${{ matrix.group }}) run: | + case ${{ matrix.group }} in + 1) + FEATURES="features/health.feature,features/metrics.feature,features/api_deploy.feature,features/mcp_deploy.feature,features/ratelimit.feature,features/jwt-auth.feature,features/cors.feature,features/word-count-guardrail.feature,features/sentence-count-guardrail.feature,features/url-guardrail.feature,features/regex-guardrail.feature" + ;; + 2) + FEATURES="features/prompt-decorator.feature,features/prompt-template.feature,features/pii-masking-regex.feature,features/json-schema-guardrail.feature,features/llm-provider-templates.feature,features/analytics-header-filter.feature,features/lazy-resources-xds.feature,features/content-length-guardrail.feature,features/azure-content-safety.feature,features/aws-bedrock-guardrail.feature,features/semantic-cache.feature" + ;; + 3) + FEATURES="features/semantic-prompt-guard.feature,features/modify-headers.feature,features/request-rewrite.feature,features/respond.feature,features/llm-provider.feature,features/certificates.feature,features/config-dump.feature,features/api-management.feature,features/api-error-responses.feature,features/list-policies.feature,features/api-keys.feature" + ;; + 4) + FEATURES="features/api-with-policies.feature,features/llm-proxies.feature,features/search-deployments.feature,features/policy-engine-admin.feature,features/cel-conditions.feature,features/analytics-basic.feature,features/backend_timeout.feature,features/llm-cost-based-ratelimit.feature,features/model-round-robin.feature,features/model-weighted-round-robin.feature" + ;; + esac cd gateway - make test-integration + IT_FEATURE_PATHS="$FEATURES" make test-integration - name: Upload coverage report uses: actions/upload-artifact@v4 if: always() with: - name: coverage-report + name: coverage-report-group-${{ matrix.group }} path: gateway/it/coverage/output retention-days: 7 @@ -53,7 +77,7 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: test-reports + name: test-reports-group-${{ matrix.group }} path: gateway/it/reports/ retention-days: 7 From 89768935e2e247b08fd9bd8c80de2f502caf9c19 Mon Sep 17 00:00:00 2001 From: Tharsanan1 Date: Thu, 12 Feb 2026 12:27:14 +0530 Subject: [PATCH 3/3] Optimize workflow by building images once and sharing via artifacts --- .../workflows/gateway-integration-test.yml | 53 ++++++++++++++++--- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gateway-integration-test.yml b/.github/workflows/gateway-integration-test.yml index c23adaeda..e16f2258c 100644 --- a/.github/workflows/gateway-integration-test.yml +++ b/.github/workflows/gateway-integration-test.yml @@ -10,12 +10,8 @@ on: - '.github/workflows/gateway-integration-test.yml' jobs: - integration-test: + build-images: runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - group: [1, 2, 3, 4] steps: - name: Checkout code uses: actions/checkout@v4 @@ -32,8 +28,6 @@ jobs: - name: Build coverage-instrumented images run: | cd gateway - # Use cache-from and cache-to for faster builds in subsequent runs - export DOCKER_METADATA_OUTPUT_JSON='{"tags":["test"],"labels":{"org.opencontainers.image.version":"test"}}' make build-coverage VERSION=test - name: Build mock server images @@ -46,6 +40,51 @@ jobs: wait echo "All mock images built." + - name: Save images to artifact + run: | + docker save \ + ghcr.io/wso2/api-platform/gateway-controller-coverage:test \ + ghcr.io/wso2/api-platform/gateway-runtime-coverage:test \ + ghcr.io/wso2/api-platform/mock-jwks:latest \ + ghcr.io/wso2/api-platform/mock-azure-content-safety:latest \ + ghcr.io/wso2/api-platform/mock-aws-bedrock-guardrail:latest \ + ghcr.io/wso2/api-platform/mock-embedding-provider:latest \ + ghcr.io/wso2/api-platform/mock-analytics-collector:latest \ + | gzip > images.tar.gz + + - name: Upload images + uses: actions/upload-artifact@v4 + with: + name: docker-images + path: images.tar.gz + retention-days: 1 + + integration-test: + needs: build-images + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + group: [1, 2, 3, 4] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.25' + cache: true + + - name: Download images + uses: actions/download-artifact@v4 + with: + name: docker-images + + - name: Load images + run: | + gunzip -c images.tar.gz | docker load + - name: Run integration tests (Group ${{ matrix.group }}) run: | case ${{ matrix.group }} in