ci: targeted builds and runner reliability improvements#207
Open
krisrice wants to merge 3 commits into
Open
Conversation
Three runner reliability improvements: - cache: 'pip' on both build and combined-coverage jobs — prevents 22+ parallel matrix jobs from cold-downloading the same ~80 packages from PyPI simultaneously (thundering herd causing network timeouts) - timeout-minutes: 15 on build job — gives a clear failure signal instead of hanging for GitHub's 6-hour default - fail-fast: false on matrix strategy — one flaky runner no longer cascades and cancels all other matrix jobs
Previously every PR triggered builds for all ~22 servers regardless of what changed. Now get-directories uses git diff against the PR base SHA to detect which src/<server>/ directories were actually touched and only runs those matrix jobs. Rules: - PR touching src/oci-compute-mcp-server/* → only builds oci-compute - PR touching requirements*.txt, .github/, or Makefile → builds all (infra change could affect every server) - Push to main → builds everything (full integration check) fetch-depth: 0 added to get-directories checkout so git diff has the full history needed to compare against the base commit.
Runs on every push to main and daily at 06:00 UTC. Checks all open non-draft PRs for merge conflicts and applies or removes the 'needs rebase' label automatically so conflict status is visible in the PR list without drilling into each PR.
gebhardtr
reviewed
Apr 27, 2026
| DIRS="$ALL" | ||
| fi | ||
|
|
||
| directories=$(echo "$DIRS" | jq -R -s -c 'split("\n") | map(select(length > 0))') |
Member
There was a problem hiding this comment.
can emit an empty list; will this break the build if only excluded/docs are updated?
Member
Author
|
Review status: not approvable yet. Blocking issue:
Steps to make it approvable:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every PR triggered a full build across all ~22 MCP servers, regardless of which server was actually changed. A PR touching one server would spin up 22 runners, download ~80 packages each, and run for 60+ seconds — wasteful and slow.
Additionally, the builds were fragile: a single flaky runner (e.g. a PyPI network timeout mid-install) would cascade-cancel all other matrix jobs.
Changes
1. Affected-files-only builds on PRs
get-directoriesnow usesgit diffagainst the PR base SHA to detect whichsrc/<server>/directories were actually changed, and only runs those matrix jobs.src/oci-compute-mcp-server/**onlyoci-compute-mcp-serveronlyrequirements*.txt,.github/, orMakefilemain2. pip caching (
cache: 'pip')Added to both
buildandcombined-coveragejobs. After the first run, the ~80 shared packages (fastmcp, oci, pydantic, etc.) are served from the runner cache instead of re-downloaded from PyPI on every job.3.
fail-fast: falseon the matrixPreviously one flaky runner (e.g. a network timeout) would cascade-cancel all other matrix jobs. Now each job fails independently.
4.
timeout-minutes: 15on the build jobReplaces GitHub's 6-hour default with a hard ceiling appropriate for these builds.