From d363b1c2bfee01b60d35b27175dfcb496dbbf262 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Oct 2025 10:33:51 +0000 Subject: [PATCH 1/5] Initial plan From cbbc19b214ecb8d3745113e939afb374bd12de8f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Oct 2025 10:42:00 +0000 Subject: [PATCH 2/5] Add ubuntu-slim runner support for lightweight workflows Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com> --- .github/workflows/__cleanup-db-cluster-dir.yml | 2 +- .github/workflows/__config-input.yml | 2 +- .github/workflows/__language-aliases.yml | 2 +- .github/workflows/check-expected-release-files.yml | 2 +- .github/workflows/label-pr-size.yml | 2 +- pr-checks/checks/cleanup-db-cluster-dir.yml | 1 + pr-checks/checks/config-input.yml | 1 + pr-checks/checks/language-aliases.yml | 1 + pr-checks/sync.py | 10 +++++++++- 9 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/__cleanup-db-cluster-dir.yml b/.github/workflows/__cleanup-db-cluster-dir.yml index dfe53c67ce..3383f4d430 100644 --- a/.github/workflows/__cleanup-db-cluster-dir.yml +++ b/.github/workflows/__cleanup-db-cluster-dir.yml @@ -36,7 +36,7 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest + - os: ubuntu-slim version: linked name: Clean up database cluster directory if: github.triggering_actor != 'dependabot[bot]' diff --git a/.github/workflows/__config-input.yml b/.github/workflows/__config-input.yml index 59db10d4d6..a6f2d2bcb0 100644 --- a/.github/workflows/__config-input.yml +++ b/.github/workflows/__config-input.yml @@ -36,7 +36,7 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest + - os: ubuntu-slim version: linked name: Config input if: github.triggering_actor != 'dependabot[bot]' diff --git a/.github/workflows/__language-aliases.yml b/.github/workflows/__language-aliases.yml index 5f95caa131..92c130dfaf 100644 --- a/.github/workflows/__language-aliases.yml +++ b/.github/workflows/__language-aliases.yml @@ -36,7 +36,7 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest + - os: ubuntu-slim version: linked name: Language aliases if: github.triggering_actor != 'dependabot[bot]' diff --git a/.github/workflows/check-expected-release-files.yml b/.github/workflows/check-expected-release-files.yml index edcc499dc8..a066cbde55 100644 --- a/.github/workflows/check-expected-release-files.yml +++ b/.github/workflows/check-expected-release-files.yml @@ -15,7 +15,7 @@ defaults: jobs: check-expected-release-files: - runs-on: ubuntu-latest + runs-on: ubuntu-slim permissions: contents: read diff --git a/.github/workflows/label-pr-size.yml b/.github/workflows/label-pr-size.yml index 83ec360f57..965a4a8587 100644 --- a/.github/workflows/label-pr-size.yml +++ b/.github/workflows/label-pr-size.yml @@ -16,7 +16,7 @@ permissions: jobs: sizeup: name: Label PR with size - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Run sizeup diff --git a/pr-checks/checks/cleanup-db-cluster-dir.yml b/pr-checks/checks/cleanup-db-cluster-dir.yml index d2cacf47eb..9cb3dfa05e 100644 --- a/pr-checks/checks/cleanup-db-cluster-dir.yml +++ b/pr-checks/checks/cleanup-db-cluster-dir.yml @@ -1,6 +1,7 @@ name: "Clean up database cluster directory" description: "The database cluster directory is cleaned up if it is not empty." versions: ["linked"] +runnerImages: ["ubuntu-slim"] steps: - name: Add a file to the database cluster directory run: | diff --git a/pr-checks/checks/config-input.yml b/pr-checks/checks/config-input.yml index f139ff90e6..7253e443e8 100644 --- a/pr-checks/checks/config-input.yml +++ b/pr-checks/checks/config-input.yml @@ -2,6 +2,7 @@ name: "Config input" description: "Tests specifying configuration using the config input" installNode: true versions: ["linked"] +runnerImages: ["ubuntu-slim"] steps: - name: Copy queries into workspace run: | diff --git a/pr-checks/checks/language-aliases.yml b/pr-checks/checks/language-aliases.yml index b0db1288a3..a5654fc880 100644 --- a/pr-checks/checks/language-aliases.yml +++ b/pr-checks/checks/language-aliases.yml @@ -1,6 +1,7 @@ name: "Language aliases" description: "Tests that language aliases are resolved correctly" versions: ["linked"] +runnerImages: ["ubuntu-slim"] steps: - uses: ./../action/init with: diff --git a/pr-checks/sync.py b/pr-checks/sync.py index f247f38245..f44ffb9646 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -76,7 +76,15 @@ def writeHeader(checkStream): if version == "latest": raise ValueError('Did not recognize "version: latest". Did you mean "version: linked"?') - runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"] + # Check if a specific runner image is specified in the check + customRunnerImages = checkSpecification.get('runnerImages') + if customRunnerImages: + # Use custom runner images specified in the check + runnerImages = customRunnerImages + else: + # Use default runner images based on operating systems + runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"] + operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu"]) for operatingSystem in operatingSystems: From 8afe386a9f546fbd7bbf37ea91dbff28becc3751 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Oct 2025 11:04:45 +0000 Subject: [PATCH 3/5] Use runnerSize property instead of runnerImages for better compatibility Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com> --- pr-checks/checks/cleanup-db-cluster-dir.yml | 2 +- pr-checks/checks/config-input.yml | 2 +- pr-checks/checks/language-aliases.yml | 2 +- pr-checks/sync.py | 30 +++++++++------------ 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/pr-checks/checks/cleanup-db-cluster-dir.yml b/pr-checks/checks/cleanup-db-cluster-dir.yml index 9cb3dfa05e..f2052cd7c5 100644 --- a/pr-checks/checks/cleanup-db-cluster-dir.yml +++ b/pr-checks/checks/cleanup-db-cluster-dir.yml @@ -1,7 +1,7 @@ name: "Clean up database cluster directory" description: "The database cluster directory is cleaned up if it is not empty." versions: ["linked"] -runnerImages: ["ubuntu-slim"] +runnerSize: "slim" steps: - name: Add a file to the database cluster directory run: | diff --git a/pr-checks/checks/config-input.yml b/pr-checks/checks/config-input.yml index 7253e443e8..8721f4de4e 100644 --- a/pr-checks/checks/config-input.yml +++ b/pr-checks/checks/config-input.yml @@ -2,7 +2,7 @@ name: "Config input" description: "Tests specifying configuration using the config input" installNode: true versions: ["linked"] -runnerImages: ["ubuntu-slim"] +runnerSize: "slim" steps: - name: Copy queries into workspace run: | diff --git a/pr-checks/checks/language-aliases.yml b/pr-checks/checks/language-aliases.yml index a5654fc880..5dca1b46fe 100644 --- a/pr-checks/checks/language-aliases.yml +++ b/pr-checks/checks/language-aliases.yml @@ -1,7 +1,7 @@ name: "Language aliases" description: "Tests that language aliases are resolved correctly" versions: ["linked"] -runnerImages: ["ubuntu-slim"] +runnerSize: "slim" steps: - uses: ./../action/init with: diff --git a/pr-checks/sync.py b/pr-checks/sync.py index f44ffb9646..d0725eaeeb 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -76,25 +76,21 @@ def writeHeader(checkStream): if version == "latest": raise ValueError('Did not recognize "version: latest". Did you mean "version: linked"?') - # Check if a specific runner image is specified in the check - customRunnerImages = checkSpecification.get('runnerImages') - if customRunnerImages: - # Use custom runner images specified in the check - runnerImages = customRunnerImages - else: - # Use default runner images based on operating systems - runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"] - + # Determine runner size (default is "latest") + # "default" maps to "latest" for the runner image name + runnerSize = checkSpecification.get('runnerSize', 'default') + actualRunnerSize = 'latest' if runnerSize == 'default' else runnerSize + + # Build runner images based on runner size and operating systems operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu"]) - + for operatingSystem in operatingSystems: - runnerImagesForOs = [image for image in runnerImages if image.startswith(operatingSystem)] - - for runnerImage in runnerImagesForOs: - matrix.append({ - 'os': runnerImage, - 'version': version - }) + # Construct the runner image name: {os}-{size} + runnerImage = f"{operatingSystem}-{actualRunnerSize}" + matrix.append({ + 'os': runnerImage, + 'version': version + }) useAllPlatformBundle = "false" # Default to false if checkSpecification.get('useAllPlatformBundle'): From 17062a689604f9e3db17eb938dc82890844d3ec5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Oct 2025 11:08:00 +0000 Subject: [PATCH 4/5] Simplify runnerSize logic and add clarifying comments Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com> --- pr-checks/sync.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pr-checks/sync.py b/pr-checks/sync.py index d0725eaeeb..a8ccf817a2 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -76,17 +76,19 @@ def writeHeader(checkStream): if version == "latest": raise ValueError('Did not recognize "version: latest". Did you mean "version: linked"?') - # Determine runner size (default is "latest") - # "default" maps to "latest" for the runner image name + # Determine runner size + # "default" is used in check specifications and maps to "latest" for the actual runner image runnerSize = checkSpecification.get('runnerSize', 'default') - actualRunnerSize = 'latest' if runnerSize == 'default' else runnerSize + if runnerSize == 'default': + runnerSize = 'latest' # Build runner images based on runner size and operating systems operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu"]) for operatingSystem in operatingSystems: # Construct the runner image name: {os}-{size} - runnerImage = f"{operatingSystem}-{actualRunnerSize}" + # Note: Not all OS types may support all runner sizes (e.g., only ubuntu-slim exists as of now) + runnerImage = f"{operatingSystem}-{runnerSize}" matrix.append({ 'os': runnerImage, 'version': version From 3f1383a26b460d8d6b835ffbdfb021e14d652ac9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Oct 2025 11:19:23 +0000 Subject: [PATCH 5/5] Disable Kotlin setup on slim runners Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com> --- .github/workflows/__cleanup-db-cluster-dir.yml | 2 +- .github/workflows/__config-input.yml | 2 +- .github/workflows/__language-aliases.yml | 2 +- pr-checks/sync.py | 13 ++++++++++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/__cleanup-db-cluster-dir.yml b/.github/workflows/__cleanup-db-cluster-dir.yml index 3383f4d430..063e38d6b3 100644 --- a/.github/workflows/__cleanup-db-cluster-dir.yml +++ b/.github/workflows/__cleanup-db-cluster-dir.yml @@ -54,7 +54,7 @@ jobs: with: version: ${{ matrix.version }} use-all-platform-bundle: 'false' - setup-kotlin: 'true' + setup-kotlin: 'false' - name: Add a file to the database cluster directory run: | mkdir -p "${{ runner.temp }}/customDbLocation/javascript" diff --git a/.github/workflows/__config-input.yml b/.github/workflows/__config-input.yml index a6f2d2bcb0..f426723525 100644 --- a/.github/workflows/__config-input.yml +++ b/.github/workflows/__config-input.yml @@ -61,7 +61,7 @@ jobs: with: version: ${{ matrix.version }} use-all-platform-bundle: 'false' - setup-kotlin: 'true' + setup-kotlin: 'false' - name: Copy queries into workspace run: | cp -a ../action/queries . diff --git a/.github/workflows/__language-aliases.yml b/.github/workflows/__language-aliases.yml index 92c130dfaf..7f8b2adf77 100644 --- a/.github/workflows/__language-aliases.yml +++ b/.github/workflows/__language-aliases.yml @@ -54,7 +54,7 @@ jobs: with: version: ${{ matrix.version }} use-all-platform-bundle: 'false' - setup-kotlin: 'true' + setup-kotlin: 'false' - uses: ./../action/init with: languages: C#,java-kotlin,swift,typescript diff --git a/pr-checks/sync.py b/pr-checks/sync.py index a8ccf817a2..a0e25aef3f 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -98,6 +98,12 @@ def writeHeader(checkStream): if checkSpecification.get('useAllPlatformBundle'): useAllPlatformBundle = checkSpecification['useAllPlatformBundle'] + # Store the runner size for use in prepare-test step + # This is determined once per check specification + finalRunnerSize = checkSpecification.get('runnerSize', 'default') + if finalRunnerSize == 'default': + finalRunnerSize = 'latest' + if 'analysisKinds' in checkSpecification: newMatrix = [] @@ -142,9 +148,10 @@ def writeHeader(checkStream): 'with': { 'version': '${{ matrix.version }}', 'use-all-platform-bundle': useAllPlatformBundle, - # If the action is being run from a container, then do not setup kotlin. - # This is because the kotlin binaries cannot be downloaded from the container. - 'setup-kotlin': str(not 'container' in checkSpecification).lower(), + # If the action is being run from a container or on a slim runner, then do not setup kotlin. + # Containers: kotlin binaries cannot be downloaded from the container. + # Slim runners: limited resources may cause issues with Kotlin setup. + 'setup-kotlin': str(not 'container' in checkSpecification and finalRunnerSize != 'slim').lower(), } })