From e557352ce9d565da8e1681e6631b11357c3f2f00 Mon Sep 17 00:00:00 2001 From: Connor Avery Date: Wed, 28 Jan 2026 16:59:08 +0000 Subject: [PATCH 1/6] Disable Apigee deployment instead of reverting for temporary flexibility, allowing deployments through the environments. --- .github/workflows/pull_request.yml | 2 +- .github/workflows/sam_release_code.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4df0ca290..93d006e01 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -118,7 +118,7 @@ jobs: RUN_REGRESSION_TESTS: true REGRESSION_TEST_PRODUCT: PFP-AWS FORWARD_CSOC_LOGS: false - DEPLOY_APIGEE: true + DEPLOY_APIGEE: false ALLOW_NHS_NUMBER_OVERRIDE: true secrets: REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }} diff --git a/.github/workflows/sam_release_code.yml b/.github/workflows/sam_release_code.yml index f2261f05e..27d1be29a 100644 --- a/.github/workflows/sam_release_code.yml +++ b/.github/workflows/sam_release_code.yml @@ -80,7 +80,7 @@ on: type: string DEPLOY_APIGEE: type: boolean - default: true + default: false MTLS_KEY: type: string required: true From 271e2ec1ff19f273f57e6781f564818c56bf45a4 Mon Sep 17 00:00:00 2001 From: Connor Avery Date: Wed, 28 Jan 2026 17:02:32 +0000 Subject: [PATCH 2/6] Don't run regression tests as no PR environment will be available --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 93d006e01..38001af00 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -115,7 +115,7 @@ jobs: TOGGLE_GET_STATUS_UPDATES: true ENABLE_ALERTS: false STATE_MACHINE_LOG_LEVEL: ALL - RUN_REGRESSION_TESTS: true + RUN_REGRESSION_TESTS: false REGRESSION_TEST_PRODUCT: PFP-AWS FORWARD_CSOC_LOGS: false DEPLOY_APIGEE: false From 9e6baa499d92eb3c3e26e5533dbd6e58327e5bd0 Mon Sep 17 00:00:00 2001 From: Connor Avery Date: Wed, 28 Jan 2026 17:05:07 +0000 Subject: [PATCH 3/6] Remove block as release.yml will still attempt regression tests --- .github/workflows/run_regression_tests.yml | 168 ++++++++++----------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/.github/workflows/run_regression_tests.yml b/.github/workflows/run_regression_tests.yml index e107abbf2..f30f92b02 100644 --- a/.github/workflows/run_regression_tests.yml +++ b/.github/workflows/run_regression_tests.yml @@ -70,87 +70,87 @@ jobs: env: PYTHON_CONFIGURE_OPTS: --enable-shared - - name: Run Regression Testing Apigee Non-Proxygen - working-directory: scripts - if: ${{ inputs.REGRESSION_TEST_NON_PROXYGEN == 'true' }} - env: - TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }} - VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }} - GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }} - run: | - if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then - REGRESSION_TEST_REPO_TAG="v3.8.18" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name - REGRESSION_TEST_WORKFLOW_TAG="v3.8.18" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG - - if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then - echo "Error: One or both tag variables are not set" >&2 - exit 1 - fi - - # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value - if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then - echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link" - curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/tags/${REGRESSION_TEST_WORKFLOW_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py - else - echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link" - curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/heads/${REGRESSION_TEST_REPO_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py - fi - - if [[ ! -f run_regression_tests.py ]]; then - echo "Error: run_regression_tests.py not found" >&2 - exit 1 - fi - - poetry install - echo Running regression tests in the "$TARGET_ENVIRONMENT" environment - poetry run python -u run_regression_tests.py \ - --env="$TARGET_ENVIRONMENT" \ - --pr_label="$VERSION_NUMBER" \ - --token=${{ steps.generate-token.outputs.token }} \ - --is_called_from_github=true \ - --product=${{ inputs.REGRESSION_TEST_PRODUCT }} \ - --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \ - --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}" - fi - - - name: Run Regression Testing Proxygen API - working-directory: scripts - env: - TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }} - VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }} - GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }} - run: | - if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then - REGRESSION_TEST_REPO_TAG="v3.8.18" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name - REGRESSION_TEST_WORKFLOW_TAG="v3.8.18" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG - - if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then - echo "Error: One or both tag variables are not set" >&2 - exit 1 - fi - - # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value - if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then - echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link" - curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/tags/${REGRESSION_TEST_WORKFLOW_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py - else - echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link" - curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/heads/${REGRESSION_TEST_REPO_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py - fi - - if [[ ! -f run_regression_tests.py ]]; then - echo "Error: run_regression_tests.py not found" >&2 - exit 1 - fi - - poetry install - echo Running regression tests in the "$TARGET_ENVIRONMENT" environment - poetry run python -u run_regression_tests.py \ - --env="$TARGET_ENVIRONMENT" \ - --pr_label="$VERSION_NUMBER" \ - --token=${{ steps.generate-token.outputs.token }} \ - --is_called_from_github=true \ - --product="PFP-PROXYGEN" \ - --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \ - --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}" - fi + # - name: Run Regression Testing Apigee Non-Proxygen + # working-directory: scripts + # if: ${{ inputs.REGRESSION_TEST_NON_PROXYGEN == 'true' }} + # env: + # TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }} + # VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }} + # GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }} + # run: | + # if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then + # REGRESSION_TEST_REPO_TAG="v3.8.18" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name + # REGRESSION_TEST_WORKFLOW_TAG="v3.8.18" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG + + # if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then + # echo "Error: One or both tag variables are not set" >&2 + # exit 1 + # fi + + # # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value + # if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then + # echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link" + # curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/tags/${REGRESSION_TEST_WORKFLOW_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py + # else + # echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link" + # curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/heads/${REGRESSION_TEST_REPO_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py + # fi + + # if [[ ! -f run_regression_tests.py ]]; then + # echo "Error: run_regression_tests.py not found" >&2 + # exit 1 + # fi + + # poetry install + # echo Running regression tests in the "$TARGET_ENVIRONMENT" environment + # poetry run python -u run_regression_tests.py \ + # --env="$TARGET_ENVIRONMENT" \ + # --pr_label="$VERSION_NUMBER" \ + # --token=${{ steps.generate-token.outputs.token }} \ + # --is_called_from_github=true \ + # --product=${{ inputs.REGRESSION_TEST_PRODUCT }} \ + # --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \ + # --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}" + # fi + + # - name: Run Regression Testing Proxygen API + # working-directory: scripts + # env: + # TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }} + # VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }} + # GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }} + # run: | + # if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then + # REGRESSION_TEST_REPO_TAG="v3.8.18" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name + # REGRESSION_TEST_WORKFLOW_TAG="v3.8.18" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG + + # if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then + # echo "Error: One or both tag variables are not set" >&2 + # exit 1 + # fi + + # # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value + # if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then + # echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link" + # curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/tags/${REGRESSION_TEST_WORKFLOW_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py + # else + # echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link" + # curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/heads/${REGRESSION_TEST_REPO_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py + # fi + + # if [[ ! -f run_regression_tests.py ]]; then + # echo "Error: run_regression_tests.py not found" >&2 + # exit 1 + # fi + + # poetry install + # echo Running regression tests in the "$TARGET_ENVIRONMENT" environment + # poetry run python -u run_regression_tests.py \ + # --env="$TARGET_ENVIRONMENT" \ + # --pr_label="$VERSION_NUMBER" \ + # --token=${{ steps.generate-token.outputs.token }} \ + # --is_called_from_github=true \ + # --product="PFP-PROXYGEN" \ + # --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \ + # --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}" + # fi From 6948c9141fd6f66c58b7824dbd49e012131ea19e Mon Sep 17 00:00:00 2001 From: Connor Avery Date: Thu, 29 Jan 2026 09:08:29 +0000 Subject: [PATCH 4/6] Run the Apigee regression tests only --- .github/workflows/pull_request.yml | 2 +- .github/workflows/run_regression_tests.yml | 60 +++++++++++----------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 38001af00..93d006e01 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -115,7 +115,7 @@ jobs: TOGGLE_GET_STATUS_UPDATES: true ENABLE_ALERTS: false STATE_MACHINE_LOG_LEVEL: ALL - RUN_REGRESSION_TESTS: false + RUN_REGRESSION_TESTS: true REGRESSION_TEST_PRODUCT: PFP-AWS FORWARD_CSOC_LOGS: false DEPLOY_APIGEE: false diff --git a/.github/workflows/run_regression_tests.yml b/.github/workflows/run_regression_tests.yml index f30f92b02..de2f8b461 100644 --- a/.github/workflows/run_regression_tests.yml +++ b/.github/workflows/run_regression_tests.yml @@ -70,36 +70,36 @@ jobs: env: PYTHON_CONFIGURE_OPTS: --enable-shared - # - name: Run Regression Testing Apigee Non-Proxygen - # working-directory: scripts - # if: ${{ inputs.REGRESSION_TEST_NON_PROXYGEN == 'true' }} - # env: - # TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }} - # VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }} - # GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }} - # run: | - # if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then - # REGRESSION_TEST_REPO_TAG="v3.8.18" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name - # REGRESSION_TEST_WORKFLOW_TAG="v3.8.18" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG - - # if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then - # echo "Error: One or both tag variables are not set" >&2 - # exit 1 - # fi - - # # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value - # if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then - # echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link" - # curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/tags/${REGRESSION_TEST_WORKFLOW_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py - # else - # echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link" - # curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/heads/${REGRESSION_TEST_REPO_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py - # fi - - # if [[ ! -f run_regression_tests.py ]]; then - # echo "Error: run_regression_tests.py not found" >&2 - # exit 1 - # fi + - name: Run Regression Testing Apigee Non-Proxygen + working-directory: scripts + if: ${{ inputs.REGRESSION_TEST_NON_PROXYGEN == 'true' }} + env: + TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }} + VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }} + GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then + REGRESSION_TEST_REPO_TAG="v3.8.18" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name + REGRESSION_TEST_WORKFLOW_TAG="v3.8.18" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG + + if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then + echo "Error: One or both tag variables are not set" >&2 + exit 1 + fi + + # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value + if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then + echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link" + curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/tags/${REGRESSION_TEST_WORKFLOW_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py + else + echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link" + curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/heads/${REGRESSION_TEST_REPO_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py + fi + + if [[ ! -f run_regression_tests.py ]]; then + echo "Error: run_regression_tests.py not found" >&2 + exit 1 + fi # poetry install # echo Running regression tests in the "$TARGET_ENVIRONMENT" environment From 463117d53825fb891938d264be9c3ba5ecf99c4e Mon Sep 17 00:00:00 2001 From: Connor Avery Date: Thu, 29 Jan 2026 09:08:59 +0000 Subject: [PATCH 5/6] Missing a part of the reg test run --- .github/workflows/run_regression_tests.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run_regression_tests.yml b/.github/workflows/run_regression_tests.yml index de2f8b461..f9d3f8ac4 100644 --- a/.github/workflows/run_regression_tests.yml +++ b/.github/workflows/run_regression_tests.yml @@ -101,17 +101,17 @@ jobs: exit 1 fi - # poetry install - # echo Running regression tests in the "$TARGET_ENVIRONMENT" environment - # poetry run python -u run_regression_tests.py \ - # --env="$TARGET_ENVIRONMENT" \ - # --pr_label="$VERSION_NUMBER" \ - # --token=${{ steps.generate-token.outputs.token }} \ - # --is_called_from_github=true \ - # --product=${{ inputs.REGRESSION_TEST_PRODUCT }} \ - # --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \ - # --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}" - # fi + poetry install + echo Running regression tests in the "$TARGET_ENVIRONMENT" environment + poetry run python -u run_regression_tests.py \ + --env="$TARGET_ENVIRONMENT" \ + --pr_label="$VERSION_NUMBER" \ + --token=${{ steps.generate-token.outputs.token }} \ + --is_called_from_github=true \ + --product=${{ inputs.REGRESSION_TEST_PRODUCT }} \ + --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \ + --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}" + fi # - name: Run Regression Testing Proxygen API # working-directory: scripts From 27ee36a3220077d45101cccd52853bca941b59a5 Mon Sep 17 00:00:00 2001 From: Connor Avery <214469360+connoravo-nhs@users.noreply.github.com> Date: Thu, 29 Jan 2026 09:49:52 +0000 Subject: [PATCH 6/6] Kick off pipelines