From 9ac671db9ab0160ca6b4399fe8fc577c4d9a8437 Mon Sep 17 00:00:00 2001 From: Sofiya Nuryyeva Date: Wed, 16 Sep 2026 15:47:43 -0400 Subject: [PATCH 1/4] updating workflow to choose the right tagging for e2e tests depending on target branch --- .github/workflows/e2e_tests.yaml | 96 +++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 31 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index e281ba6ae..fe4f3fb05 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -15,44 +15,70 @@ jobs: authorize: uses: ./.github/workflows/e2e_authorize.yaml - e2e_tests: + select_matrix: needs: authorize if: needs.authorize.outputs.authorized == 'true' runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.pick.outputs.matrix }} + steps: + - id: pick + env: + EVENT_NAME: ${{ github.event_name }} + BASE_REF: ${{ github.event.pull_request.base.ref }} + REF_NAME: ${{ github.ref_name }} + run: | + python3 <<'PY' + import json + import os + + event = os.environ["EVENT_NAME"] + target = os.environ["BASE_REF"] if event == "pull_request_target" else os.environ["REF_NAME"] + + cfg_shards = [ + {"name": "default", "tags": "not @skip and @cfg_default"}, + {"name": "authorized", "tags": "not @skip and @cfg_authorized"}, + {"name": "mcp", "tags": "not @skip and (@cfg_mcp or @cfg_mcp_invalid or @cfg_mcp_api_auth)"}, + {"name": "rbac", "tags": "not @skip and @cfg_rbac"}, + {"name": "skills", "tags": "not @skip and (@cfg_skills or @cfg_skills_directory)"}, + {"name": "shields", "tags": "not @skip and @cfg_shields"}, + {"name": "other", "tags": "not @skip and (@cfg_rh_identity or @cfg_negative or @cfg_byok_pdf or @cfg_degraded or @cfg_unified)"}, + {"name": "tls", "tags": "not @skip and @cfg_tls"}, + ] + + if target == "release/0.6": + shards = [ + {"name": f"group {i}", "tags": f"not @skip and @e2e_group_{i}"} + for i in (1, 2, 3) + ] + skip_library_tls = False + elif target in ("main", "release/0.7"): + shards = cfg_shards + skip_library_tls = True + else: + raise SystemExit(f"No E2E matrix for target branch {target!r}") + + include = [] + for mode in ("server", "library"): + for shard in shards: + if skip_library_tls and mode == "library" and shard["name"] == "tls": + continue + include.append({"mode": mode, "environment": "ci", "shard": shard}) + + with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as handle: + handle.write(f"matrix={json.dumps({'include': include}, separators=(',', ':'))}\n") + PY + + e2e_tests: + needs: [authorize, select_matrix] + if: needs.authorize.outputs.authorized == 'true' + runs-on: ubuntu-latest strategy: fail-fast: false - matrix: - mode: ["server", "library"] - environment: ["ci"] - # Config-aligned shards (@cfg_*). Packed small groups keep job count reasonable - # while avoiding mixed-config restarts inside large suites. - shard: - - name: default - tags: "not @skip and @cfg_default" - - name: authorized - tags: "not @skip and @cfg_authorized" - - name: mcp - tags: "not @skip and (@cfg_mcp or @cfg_mcp_invalid or @cfg_mcp_api_auth)" - - name: rbac - tags: "not @skip and @cfg_rbac" - - name: skills - tags: "not @skip and (@cfg_skills or @cfg_skills_directory)" - - name: shields - tags: "not @skip and @cfg_shields" - - name: other - tags: "not @skip and (@cfg_rh_identity or @cfg_negative or @cfg_byok_pdf or @cfg_degraded or @cfg_unified)" - # Server-only; listed in shard (not matrix.include) so it expands with - # mode=server before any library jobs. include would append after library. - - name: tls - tags: "not @skip and @cfg_tls" - exclude: - - mode: library - shard: - name: tls - tags: "not @skip and @cfg_tls" + matrix: ${{ fromJSON(needs.select_matrix.outputs.matrix) }} name: "E2E: ${{ matrix.mode }} / ${{ matrix.environment }} / ${{ matrix.shard.name }}" - + env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} E2E_OPENAI_MODEL: ${{ vars.E2E_OPENAI_MODEL }} @@ -174,6 +200,14 @@ jobs: python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-mpnet-base-v2')" echo "HF_CACHE_PATH=/tmp/hf-cache" >> $GITHUB_ENV + - name: Docker Login for quay access + if: matrix.mode == 'server' && github.event.pull_request.base.ref == 'release/0.6' + env: + QUAY_ROBOT_USERNAME: ${{ secrets.QUAY_DOWNSTREAM_USERNAME }} + QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_DOWNSTREAM_TOKEN }} + run: | + echo $QUAY_ROBOT_TOKEN | docker login quay.io -u=$QUAY_ROBOT_USERNAME --password-stdin + - name: Create dummy GCP keys directory if: matrix.environment != 'vertexai' run: | From 65323fda4b6e247e987fe913c91fd9647bce15d7 Mon Sep 17 00:00:00 2001 From: Sofiya Nuryyeva Date: Wed, 16 Sep 2026 15:55:19 -0400 Subject: [PATCH 2/4] removed wrongly added step --- .github/workflows/e2e_tests.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index fe4f3fb05..e8b2c5947 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -200,14 +200,6 @@ jobs: python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-mpnet-base-v2')" echo "HF_CACHE_PATH=/tmp/hf-cache" >> $GITHUB_ENV - - name: Docker Login for quay access - if: matrix.mode == 'server' && github.event.pull_request.base.ref == 'release/0.6' - env: - QUAY_ROBOT_USERNAME: ${{ secrets.QUAY_DOWNSTREAM_USERNAME }} - QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_DOWNSTREAM_TOKEN }} - run: | - echo $QUAY_ROBOT_TOKEN | docker login quay.io -u=$QUAY_ROBOT_USERNAME --password-stdin - - name: Create dummy GCP keys directory if: matrix.environment != 'vertexai' run: | From 77e084640fce503fcfa5e76fd0517886b114b7a4 Mon Sep 17 00:00:00 2001 From: Sofiya Nuryyeva Date: Wed, 16 Sep 2026 16:09:40 -0400 Subject: [PATCH 3/4] fixed condition --- .github/workflows/e2e_tests.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index e8b2c5947..f2f10acd0 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -52,11 +52,9 @@ jobs: for i in (1, 2, 3) ] skip_library_tls = False - elif target in ("main", "release/0.7"): + else: shards = cfg_shards skip_library_tls = True - else: - raise SystemExit(f"No E2E matrix for target branch {target!r}") include = [] for mode in ("server", "library"): From 939576356958c677c7e8210c965087bc70b6ba9f Mon Sep 17 00:00:00 2001 From: Sofiya Nuryyeva Date: Thu, 17 Sep 2026 12:08:31 -0400 Subject: [PATCH 4/4] updated matrix selection --- .github/workflows/e2e_tests.yaml | 136 +++++++++++++++++++------------ 1 file changed, 82 insertions(+), 54 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index f2f10acd0..4d9dd99b5 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -15,65 +15,93 @@ jobs: authorize: uses: ./.github/workflows/e2e_authorize.yaml - select_matrix: - needs: authorize - if: needs.authorize.outputs.authorized == 'true' - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.pick.outputs.matrix }} - steps: - - id: pick - env: - EVENT_NAME: ${{ github.event_name }} - BASE_REF: ${{ github.event.pull_request.base.ref }} - REF_NAME: ${{ github.ref_name }} - run: | - python3 <<'PY' - import json - import os - - event = os.environ["EVENT_NAME"] - target = os.environ["BASE_REF"] if event == "pull_request_target" else os.environ["REF_NAME"] - - cfg_shards = [ - {"name": "default", "tags": "not @skip and @cfg_default"}, - {"name": "authorized", "tags": "not @skip and @cfg_authorized"}, - {"name": "mcp", "tags": "not @skip and (@cfg_mcp or @cfg_mcp_invalid or @cfg_mcp_api_auth)"}, - {"name": "rbac", "tags": "not @skip and @cfg_rbac"}, - {"name": "skills", "tags": "not @skip and (@cfg_skills or @cfg_skills_directory)"}, - {"name": "shields", "tags": "not @skip and @cfg_shields"}, - {"name": "other", "tags": "not @skip and (@cfg_rh_identity or @cfg_negative or @cfg_byok_pdf or @cfg_degraded or @cfg_unified)"}, - {"name": "tls", "tags": "not @skip and @cfg_tls"}, - ] - - if target == "release/0.6": - shards = [ - {"name": f"group {i}", "tags": f"not @skip and @e2e_group_{i}"} - for i in (1, 2, 3) - ] - skip_library_tls = False - else: - shards = cfg_shards - skip_library_tls = True - - include = [] - for mode in ("server", "library"): - for shard in shards: - if skip_library_tls and mode == "library" and shard["name"] == "tls": - continue - include.append({"mode": mode, "environment": "ci", "shard": shard}) - - with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as handle: - handle.write(f"matrix={json.dumps({'include': include}, separators=(',', ':'))}\n") - PY - e2e_tests: - needs: [authorize, select_matrix] + needs: authorize if: needs.authorize.outputs.authorized == 'true' runs-on: ubuntu-latest strategy: fail-fast: false - matrix: ${{ fromJSON(needs.select_matrix.outputs.matrix) }} + matrix: + mode: ["server", "library"] + environment: ["ci"] + is_release_06: + - ${{ github.base_ref == 'release/0.6' }} + # Config-aligned shards (@cfg_*). Packed small groups keep job count reasonable + # while avoiding mixed-config restarts inside large suites. + shard: + - name: default + tags: "not @skip and @cfg_default" + - name: authorized + tags: "not @skip and @cfg_authorized" + - name: mcp + tags: "not @skip and (@cfg_mcp or @cfg_mcp_invalid or @cfg_mcp_api_auth)" + - name: rbac + tags: "not @skip and @cfg_rbac" + - name: skills + tags: "not @skip and (@cfg_skills or @cfg_skills_directory)" + - name: shields + tags: "not @skip and @cfg_shields" + - name: other + tags: "not @skip and (@cfg_rh_identity or @cfg_negative or @cfg_byok_pdf or @cfg_degraded or @cfg_unified)" + # Server-only; listed in shard (not matrix.include) so it expands with + # mode=server before any library jobs. include would append after library. + - name: tls + tags: "not @skip and @cfg_tls" + - name: group 1 + tags: "not @skip and @e2e_group_1" + - name: group 2 + tags: "not @skip and @e2e_group_2" + - name: group 3 + tags: "not @skip and @e2e_group_3" + exclude: + - mode: library + shard: + name: tls + tags: "not @skip and @cfg_tls" + - is_release_06: true + shard: + name: default + tags: "not @skip and @cfg_default" + - is_release_06: true + shard: + name: authorized + tags: "not @skip and @cfg_authorized" + - is_release_06: true + shard: + name: mcp + tags: "not @skip and (@cfg_mcp or @cfg_mcp_invalid or @cfg_mcp_api_auth)" + - is_release_06: true + shard: + name: rbac + tags: "not @skip and @cfg_rbac" + - is_release_06: true + shard: + name: skills + tags: "not @skip and (@cfg_skills or @cfg_skills_directory)" + - is_release_06: true + shard: + name: shields + tags: "not @skip and @cfg_shields" + - is_release_06: true + shard: + name: other + tags: "not @skip and (@cfg_rh_identity or @cfg_negative or @cfg_byok_pdf or @cfg_degraded or @cfg_unified)" + - is_release_06: true + shard: + name: tls + tags: "not @skip and @cfg_tls" + - is_release_06: false + shard: + name: group 1 + tags: "not @skip and @e2e_group_1" + - is_release_06: false + shard: + name: group 2 + tags: "not @skip and @e2e_group_2" + - is_release_06: false + shard: + name: group 3 + tags: "not @skip and @e2e_group_3" name: "E2E: ${{ matrix.mode }} / ${{ matrix.environment }} / ${{ matrix.shard.name }}"