From 71f44d1bce31001617a8fb63416bca3e11c14291 Mon Sep 17 00:00:00 2001 From: salmannawaz Date: Wed, 18 Nov 2026 12:04:29 +0500 Subject: [PATCH 1/2] build: support uv-based edx-repo-health layout in repo health job Set up uv so the scripts can install dependencies from uv.lock, and detect whether edx-repo-health uses the new src/scripts layout or the legacy scripts/ + requirements/ layout so older EDX_REPO_HEALTH_BRANCH refs keep working. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/repo-health-job.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/repo-health-job.yml b/.github/workflows/repo-health-job.yml index b8a979d..9c38a80 100644 --- a/.github/workflows/repo-health-job.yml +++ b/.github/workflows/repo-health-job.yml @@ -103,10 +103,24 @@ jobs: path: edx-repo-health ref: ${{ inputs.EDX_REPO_HEALTH_BRANCH }} - - name: Install pip & pip-tools + # The scripts install edx-repo-health's dependencies from uv.lock with `uv export`. + - name: Setup uv + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + + # edx-repo-health moved its scripts from scripts/ to src/scripts/ and dropped + # requirements/ for uv. Support both layouts so this workflow keeps working for + # EDX_REPO_HEALTH_BRANCH refs from before and after that change. + - name: Detect edx-repo-health layout run: | - python3 -m pip install -r edx-repo-health/requirements/pip.txt - python3 -m pip install -r edx-repo-health/requirements/pip-tools.txt + if [ -d edx-repo-health/src/scripts ]; then + echo "EDX_REPO_HEALTH_SCRIPTS=edx-repo-health/src/scripts" >> "$GITHUB_ENV" + else + echo "EDX_REPO_HEALTH_SCRIPTS=edx-repo-health/scripts" >> "$GITHUB_ENV" + fi + if [ -f edx-repo-health/requirements/pip.txt ]; then + python3 -m pip install -r edx-repo-health/requirements/pip.txt + python3 -m pip install -r edx-repo-health/requirements/pip-tools.txt + fi - name: Clone testeng-ci repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -147,7 +161,7 @@ jobs: REPO_HEALTH_OWNERSHIP_SPREADSHEET_URL: ${{ inputs.REPO_HEALTH_OWNERSHIP_SPREADSHEET_URL }} MAX_REPOS: ${{ inputs.MAX_REPOS }} run: | - bash edx-repo-health/scripts/repo-health-script.sh + bash "${EDX_REPO_HEALTH_SCRIPTS}/repo-health-script.sh" - name: Run dependencies health dashboard script if: ${{ inputs.DASHBOARD_NAME == 'dependencies_health' }} @@ -158,12 +172,12 @@ jobs: EDX_REPO_HEALTH_BRANCH: ${{ inputs.EDX_REPO_HEALTH_BRANCH }} ONLY_CHECK_THIS_REPOSITORY: ${{ inputs.ONLY_CHECK_THIS_REPOSITORY }} run: | - bash edx-repo-health/scripts/dependencies-health-script.sh + bash "${EDX_REPO_HEALTH_SCRIPTS}/dependencies-health-script.sh" - name: Run repo health artifact script if: ${{ inputs.DASHBOARD_NAME == 'repo_health' }} run: | - bash edx-repo-health/scripts/repo-health-artifact.sh + bash "${EDX_REPO_HEALTH_SCRIPTS}/repo-health-artifact.sh" - name: Upload sqlite db as artifact if: ${{ inputs.DASHBOARD_NAME == 'repo_health' }} From 4f85533189c46d320bcf491567149153c8fa4c73 Mon Sep 17 00:00:00 2001 From: salmannawaz Date: Wed, 18 Nov 2026 12:41:37 +0500 Subject: [PATCH 2/2] build: disable setup-uv cache in repo health job The legacy edx-repo-health layout never runs uv, so the uv cache directory is never created and setup-uv's post-job cache save fails the run. Disable the cache until the legacy layout is no longer supported. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/repo-health-job.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/repo-health-job.yml b/.github/workflows/repo-health-job.yml index 9c38a80..9f8be78 100644 --- a/.github/workflows/repo-health-job.yml +++ b/.github/workflows/repo-health-job.yml @@ -106,6 +106,11 @@ jobs: # The scripts install edx-repo-health's dependencies from uv.lock with `uv export`. - name: Setup uv uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + with: + # TODO: Remove once the old edx-repo-health layout (scripts/, requirements/) is + # no longer supported below. The old scripts never run uv, so its cache directory + # is never created and setup-uv's post-job cache save fails the run. + enable-cache: false # edx-repo-health moved its scripts from scripts/ to src/scripts/ and dropped # requirements/ for uv. Support both layouts so this workflow keeps working for