From bfeaf94bee8df7729ba7b602705b3337737be2d7 Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Thu, 22 May 2025 12:56:26 -0500 Subject: [PATCH 1/3] [releases/2.3] github: Specify required permissions for each job Backport of #1140 to releases/2.3. Without job-level permissions on the callers, reusable report_test_results.yml requests checks/pull-requests write that its callers do not grant, so PR builds from forks fail at startup ("The workflow is requesting 'checks: write, pull-requests: write', but is only allowed 'checks: none, pull-requests: none'"). (cherry picked from commit 26c46d3ee28c36e3b022051237dc1461bc25e2a6) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/CI.yml | 5 ++++- .github/workflows/PR.yml | 3 +++ .github/workflows/Publish_NIMS.yml | 2 ++ .github/workflows/report_test_results.yml | 7 +++---- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8a7fb565d..6514d043d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,4 +30,7 @@ jobs: name: Report test results uses: ./.github/workflows/report_test_results.yml needs: [run_unit_tests, run_system_tests] - if: always() \ No newline at end of file + if: always() + permissions: + checks: write + pull-requests: write \ No newline at end of file diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index ddb6c24fc..0f56f9ce4 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -16,3 +16,6 @@ jobs: run_ci: name: Run CI uses: ./.github/workflows/CI.yml + permissions: + checks: write + pull-requests: write \ No newline at end of file diff --git a/.github/workflows/Publish_NIMS.yml b/.github/workflows/Publish_NIMS.yml index 920140415..7cc06b7bb 100644 --- a/.github/workflows/Publish_NIMS.yml +++ b/.github/workflows/Publish_NIMS.yml @@ -23,6 +23,8 @@ jobs: build: name: Build runs-on : ubuntu-latest + permissions: + contents: write steps: - name: Check out repo uses: actions/checkout@v4 diff --git a/.github/workflows/report_test_results.yml b/.github/workflows/report_test_results.yml index 9543a9dd2..f60f8e1c0 100644 --- a/.github/workflows/report_test_results.yml +++ b/.github/workflows/report_test_results.yml @@ -4,14 +4,13 @@ on: workflow_call: workflow_dispatch: -permissions: - checks: write - pull-requests: write - jobs: report_test_results: name: Report test results runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write steps: - name: Check out repo uses: actions/checkout@v4 From d1e13a7cc1aebd4bfe3287cfc2180d437e1413e6 Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Mon, 30 Nov 2026 15:56:10 -0500 Subject: [PATCH 2/3] [releases/2.3] github: Pin Ubuntu runners to ubuntu-24.04 ubuntu-latest now resolves to Ubuntu 26.04, which has no Python 3.11.9 build, so setup-python fails in Check NIMS, Check NIMG, and Check examples. Pin the Ubuntu jobs that set up Python to ubuntu-24.04 so this release branch keeps testing on the same Python versions as before. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/Publish_NIMS.yml | 2 +- .github/workflows/check_examples.yml | 2 +- .github/workflows/check_nimg.yml | 2 +- .github/workflows/check_nims.yml | 2 +- .github/workflows/run_unit_tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Publish_NIMS.yml b/.github/workflows/Publish_NIMS.yml index 7cc06b7bb..b468b5be8 100644 --- a/.github/workflows/Publish_NIMS.yml +++ b/.github/workflows/Publish_NIMS.yml @@ -22,7 +22,7 @@ jobs: # package version that doesn't exist yet. build: name: Build - runs-on : ubuntu-latest + runs-on : ubuntu-24.04 permissions: contents: write steps: diff --git a/.github/workflows/check_examples.yml b/.github/workflows/check_examples.yml index cb11b2490..85ae5c3ae 100644 --- a/.github/workflows/check_examples.yml +++ b/.github/workflows/check_examples.yml @@ -11,7 +11,7 @@ env: jobs: check_examples: name: Check examples - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out repo uses: actions/checkout@v4 diff --git a/.github/workflows/check_nimg.yml b/.github/workflows/check_nimg.yml index 6fb193a4f..d366dbe98 100644 --- a/.github/workflows/check_nimg.yml +++ b/.github/workflows/check_nimg.yml @@ -11,7 +11,7 @@ env: jobs: check_nimg: name: Check NIMG - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 defaults: run: # Set the working-directory for all steps in this job. diff --git a/.github/workflows/check_nims.yml b/.github/workflows/check_nims.yml index d2952416d..b79b3e9b5 100644 --- a/.github/workflows/check_nims.yml +++ b/.github/workflows/check_nims.yml @@ -11,7 +11,7 @@ env: jobs: check_nims: name: Check NIMS - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 defaults: run: # Set the working-directory for all steps in this job. diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml index 58a12bc26..e897f721b 100644 --- a/.github/workflows/run_unit_tests.yml +++ b/.github/workflows/run_unit_tests.yml @@ -13,7 +13,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest] + os: [windows-latest, ubuntu-24.04] python-version: [3.9, '3.10', 3.11, 3.12, 3.13] # Fail-fast skews the pass/fail ratio and seems to make pytest produce # incomplete JUnit XML results. From e0df67885911219015f0dcb8ea8ea3be85a00feb Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Mon, 30 Nov 2026 16:44:23 -0500 Subject: [PATCH 3/3] [releases/2.3] github: Install tested Python versions for system tests The shared self-hosted system test image now defaults to Python 3.15, which only main targets. grpcio 1.71.0 from this branch's lock file has no cp315 wheels, so poetry install falls back to a source build and fails. Install the versions in this branch's tox envlist (3.9-3.13) with the architecture that matches the py32/py64 configuration, and make 3.11 the default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/run_system_tests.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/run_system_tests.yml b/.github/workflows/run_system_tests.yml index 8118e3b2f..34cd81e8e 100644 --- a/.github/workflows/run_system_tests.yml +++ b/.github/workflows/run_system_tests.yml @@ -22,6 +22,19 @@ jobs: steps: - name: Check out repo uses: actions/checkout@v4 + # The shared self-hosted image only provides the Python versions that main + # tests, so install the versions this branch's tox envlist needs. The last + # version listed becomes the default python used by Poetry. + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: | + 3.9 + 3.10 + 3.12 + 3.13 + 3.11 + architecture: ${{ matrix.configuration == 'py32' && 'x86' || 'x64' }} - name: Copy and rename .env.simulation to .env run: cp examples/.env.simulation .env