Skip to content

fix(ci): Increase usable disk space for ci jobs#26876

Merged
czentgr merged 1 commit intoprestodb:masterfrom
czentgr:cz_address_disk_space
Dec 30, 2025
Merged

fix(ci): Increase usable disk space for ci jobs#26876
czentgr merged 1 commit intoprestodb:masterfrom
czentgr:cz_address_disk_space

Conversation

@czentgr
Copy link
Copy Markdown
Contributor

@czentgr czentgr commented Dec 30, 2025

Tests are running inside the dependency container
and not directly on the runner.
As such we need to expand the usage of
deleting unnecessary installed components
from the runner.

Addresses #26864

Description

Motivation and Context

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

Tests are running inside the dependency container
and not directly on the runner.
As such we need to expand the usage of
deleting unnecessary installed components
from the runner.
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Dec 30, 2025
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Dec 30, 2025

Reviewer's Guide

Updates the prestocpp Linux CI workflow to reclaim disk space on the GitHub runner even when jobs run inside a dependency container, by bind-mounting host directories into the container and deleting large, unused toolchains before artifacts are downloaded and tests run.

File-Level Changes

Change Details Files
Mount host tool directories into the prestocpp dependency container and add an explicit disk space cleanup step to all relevant CI jobs.
  • Bind-mount /usr and /opt from the Ubuntu runner into the container under /host_usr and /host_opt for all prestocpp Linux build and test jobs that use the prestodb/presto-native-dependency image.
  • Introduce a shared "Free Disk Space" step in each job that defines a helper to report available disk space, logs space before and after cleanup, and deletes large unused components (DotNet, Android SDK, CodeQL) from the mounted host directories.
  • Place the cleanup step early in each job, before artifact download and test execution, so subsequent build and test steps have increased free disk capacity.
.github/workflows/prestocpp-linux-build-and-unit-test.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@czentgr czentgr marked this pull request as ready for review December 30, 2025 18:56
@czentgr czentgr requested review from a team and unidevel as code owners December 30, 2025 18:56
@prestodb-ci prestodb-ci requested review from a team, auden-woolfson and libianoss and removed request for a team December 30, 2025 18:56
Copy link
Copy Markdown
Contributor

@unidevel unidevel left a comment

Choose a reason for hiding this comment

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

LGTM

@czentgr czentgr merged commit 0473b99 into prestodb:master Dec 30, 2025
82 of 85 checks passed
@czentgr czentgr deleted the cz_address_disk_space branch December 30, 2025 19:00
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The Free Disk Space step is duplicated across multiple jobs with identical script bodies; consider extracting this into a composite action or a reusable workflow to keep the workflow DRY and make future changes to the cleanup logic easier.
  • The getAvailableSpace helper is defined as getAvailableSpace() { echo $(df -a $1 | ...) } but is always invoked without an argument; either remove the unused $1 parameter or explicitly pass a target mount point to make the intent and output clearer.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `Free Disk Space` step is duplicated across multiple jobs with identical script bodies; consider extracting this into a composite action or a reusable workflow to keep the workflow DRY and make future changes to the cleanup logic easier.
- The `getAvailableSpace` helper is defined as `getAvailableSpace() { echo $(df -a $1 | ...) }` but is always invoked without an argument; either remove the unused `$1` parameter or explicitly pass a target mount point to make the intent and output clearer.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@arhimondr
Copy link
Copy Markdown
Member

Thank you @czentgr for unblocking landing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants