ci: free disk space before Runner Tests to avoid Docker pull failures#806
Merged
Conversation
The Runner Tests job runs on a Microsoft-hosted ubuntu-latest agent and pulls many large component images during the suite, exhausting /var/lib/docker and failing with 'no space left on device'. Reclaim the OS disk by removing the unused preinstalled toolsets (dotnet, Android SDK, Haskell, CodeQL) and pruning Docker before the tests run. Reports disk usage before/after for future tuning.
keboola-pr-reviewer-bot
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: needs_human (risk 2/5) · profile ajda
CI/CD pipeline edit — policy mandates human review for pipeline changes regardless of size.
Concerns:
azure-pipelines.yml: CI pipeline change (needs human per policy); adds sudo rm -rf + docker prune to runnerTests
Suggested reviewers: pr-author
There was a problem hiding this comment.
Pull request overview
This PR updates the Azure Pipelines CI to reduce intermittent Runner Tests failures caused by the hosted ubuntu-latest agent running out of disk space under /var/lib/docker while pulling large Docker images.
Changes:
- Add a
Free disk spacestep at the start of therunnerTestsjob to remove large preinstalled toolsets (e.g., .NET, Android, GHC) and prune Docker state. - Print
df -h /before/after cleanup to make reclaimed space visible in CI logs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+65
to
+68
| echo '=== disk usage before cleanup ===' | ||
| df -h / | ||
| sudo du -sh /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/.ghcup /opt/hostedtoolcache 2>/dev/null | sort -h || true | ||
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/.ghcup /opt/hostedtoolcache/CodeQL |
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.
Summary
The Runner Tests job runs on a Microsoft-hosted
ubuntu-latestagent and pulls many large component images during the suite. That exhausts/var/lib/dockerand the job fails intermittently with:This is not a test failure — it's the agent running out of disk mid-run.
Fix
Add a
Free disk spacestep at the start of therunnerTestsjob that reclaims the OS disk (where/var/lib/dockerlives) by removing the large preinstalled toolsets the agent image ships but this repo never uses — .NET (/usr/share/dotnet), Android SDK (/usr/local/lib/android), Haskell (/opt/ghc,/usr/local/.ghcup) and CodeQL (/opt/hostedtoolcache/CodeQL) — and runsdocker system prune -af. It printsdf -hand adubreakdown before/after so we can see actual numbers and tune later.Scoped to
runnerTests(the job that fails). If the same wall is hit by other hosted-agent jobs (e.g. the storage-backend suites) the same step can be added there; if freeing the OS disk turns out to be insufficient, the fallback is relocating Docker'sdata-rootto a larger mounted volume.Unblocks CI for #805 (AJDA-3007).
Release Notes
Justification
Plans for Customer Communication
Impact Analysis
azure-pipelines.yml), therunnerTestsjob. The removed directories are unused preinstalled toolsets on the ephemeral agent; deletion is scoped to the agent VM for that run. No impact on tenants or runtime behavior.Deployment Plan
main; applies to subsequent pipeline runs. No deployment.Rollback Plan
Post-Release Support Plan
df -houtput confirms how much space is reclaimed.