- 
                Notifications
    
You must be signed in to change notification settings  - Fork 413
 
Add ubuntu-slim runner support for lightweight workflows #3255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
| 
           @copilot This works, but the addition of a new property  Could you instead expose a "runner size" property?  | 
    
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
          
 Changed to use  
 The runner size applies to all OSes specified in   | 
    
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the new ubuntu-slim runner to optimize resource usage for lightweight workflows. The changes introduce a runnerSize field to the check specification system, allowing workflows to specify whether they should run on slim or latest (default) runners.
Key changes:
- Enhanced the PR check generation system (
sync.py) to support configurable runner sizes - Updated 3 check templates to use 
ubuntu-slimrunners for lightweight validation tasks - Updated 2 non-generated workflows to use 
ubuntu-slimrunners for simple operations 
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description | 
|---|---|
| pr-checks/sync.py | Adds runnerSize parameter support to dynamically construct runner image names | 
| pr-checks/checks/language-aliases.yml | Adds runnerSize: "slim" for language resolution testing | 
| pr-checks/checks/config-input.yml | Adds runnerSize: "slim" for JavaScript analysis workflow | 
| pr-checks/checks/cleanup-db-cluster-dir.yml | Adds runnerSize: "slim" for file system testing | 
| .github/workflows/label-pr-size.yml | Changes runner from ubuntu-latest to ubuntu-slim | 
| .github/workflows/check-expected-release-files.yml | Changes runner from ubuntu-latest to ubuntu-slim | 
| .github/workflows/__language-aliases.yml | Generated workflow updated to use ubuntu-slim | 
| .github/workflows/__config-input.yml | Generated workflow updated to use ubuntu-slim | 
| .github/workflows/__cleanup-db-cluster-dir.yml | Generated workflow updated to use ubuntu-slim | 
| 
           @copilot Don't use slim when we call   | 
    
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
          
 Fixed. Kotlin setup is now disabled on slim runners (similar to containers). The three workflows using   | 
    
Plan: Add ubuntu-slim runner support to CodeQL Action workflows ✅
Implementation Complete ✅
Core Infrastructure Changes
Modified
pr-checks/sync.pyrunnerSizefield in check specificationsrunnerSize: default(or omitted) uses{os}-latestrunners (e.g., ubuntu-latest, macos-latest)runnerSize: slimuses{os}-slimrunners (e.g., ubuntu-slim)operatingSystems- the runner size is applied to all specified OSesSetup Kotlin Logic:
Example behavior:
Check Templates Updated (3 files)
Carefully selected lightweight checks suitable for ubuntu-slim:
All three workflows now run with
setup-kotlin: falsedue to using slim runners.Non-Generated Workflows Updated (2 files)
Generated Workflows (automatically regenerated)
setup-kotlin: falsesetup-kotlin: falsesetup-kotlin: falseTesting & Validation ✅
setup-kotlin: trueSecurity Summary
No vulnerabilities detected in Python code changes (sync.py) or YAML configuration files.
Addressed Feedback
runnerImagestorunnerSizeproperty to avoid conflicts withoperatingSystemsrunnerSize: defaultto indicate ubuntu-latest as requestedOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.