Skip to content

ci: free disk space before Runner Tests to avoid Docker pull failures#806

Merged
MiroCillik merged 1 commit into
mainfrom
miro-ci-free-disk-space
Jul 10, 2026
Merged

ci: free disk space before Runner Tests to avoid Docker pull failures#806
MiroCillik merged 1 commit into
mainfrom
miro-ci-free-disk-space

Conversation

@MiroCillik

Copy link
Copy Markdown
Member

Summary

The Runner Tests job runs on a Microsoft-hosted ubuntu-latest agent and pulls many large component images during the suite. That exhausts /var/lib/docker and the job fails intermittently with:

Cannot pull image '…keboola.snowflake-transformation:1.5.0':
write /var/lib/docker/tmp/GetImageBlob…: no space left on device

This is not a test failure — it's the agent running out of disk mid-run.

Fix

Add a Free disk space step at the start of the runnerTests job that reclaims the OS disk (where /var/lib/docker lives) 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 runs docker system prune -af. It prints df -h and a du breakdown 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's data-root to a larger mounted volume.

Unblocks CI for #805 (AJDA-3007).

Release Notes

  • Justification

    • CI-only change. The Runner Tests job intermittently fails because the hosted build agent runs out of disk while pulling component images; this frees agent disk so the suite can complete. No product/runtime code is touched.
  • Plans for Customer Communication

    • None. Internal CI change, no customer-facing impact.
  • Impact Analysis

    • Affects only the CI pipeline (azure-pipelines.yml), the runnerTests job. 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

    • Merge to main; applies to subsequent pipeline runs. No deployment.
  • Rollback Plan

    • Fully reversible — revert the commit.
  • Post-Release Support Plan

    • None. Watch the next Runner Tests run; the before/after df -h output confirms how much space is reclaimed.

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 keboola-pr-reviewer-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot AI left a comment

Copy link
Copy Markdown

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 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 space step at the start of the runnerTests job 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 thread azure-pipelines.yml
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
@MiroCillik MiroCillik merged commit d3d48df into main Jul 10, 2026
12 checks passed
@MiroCillik MiroCillik deleted the miro-ci-free-disk-space branch July 10, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants