Skip to content

feat(integration): add action to free space on runner#1237

Merged
dmikusa merged 7 commits intopaketo-buildpacks:mainfrom
idiap:feat/reclaim-space
Dec 11, 2025
Merged

feat(integration): add action to free space on runner#1237
dmikusa merged 7 commits intopaketo-buildpacks:mainfrom
idiap:feat/reclaim-space

Conversation

@sgaist
Copy link
Contributor

@sgaist sgaist commented Dec 7, 2025

Summary

Some integration tests, more specifically those for python, often fail with an out of space error.

This PR adds a new job with an action that frees some space on the runner which allows these tests to pass successfully.

Use Cases

Ensure successful runs of integration tests, more specifically those from the python buildpacks.

See:

paketo-buildpacks/conda-env-update#464
paketo-buildpacks/poetry#555

As example of run failures.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Some integration tests, more specifically those for
python, often fail with an out of space error.

This action frees some space on the runner which allows
these tests to pass successfully.
@sgaist sgaist requested a review from a team as a code owner December 9, 2025 16:06
@dmikusa
Copy link
Contributor

dmikusa commented Dec 10, 2025

I think my biggest concern is taking on a dependency in the form of this 3rd party action that doesn't seem well maintained. There hasn't been a release in a long time and there is at least one PR asking for improvements with no responses.

Not that this is an action that needs constant maintenance, but this gives me cause for concern: jlumbroso/free-disk-space#48

Personally, I'd like to see one of the two things happen:

  1. Just copy a couple of the rm -rf's into a step with a run: directly. It's not rocket science and our tooling will push this snippet around to where it needs to go.

  2. Copy the implementation from this PR Updates from several community members jlumbroso/free-disk-space#48 into our actions. This has several improvements including using rmz which is a much faster alternative to rm. Then we use our own action.

No strong preference which, as both avoid a dependency on a 3rd party.

@sgaist
Copy link
Contributor Author

sgaist commented Dec 10, 2025

I think that the second option is a good alternative, in case we would need some additional space we will have all the possible cleanup at hands.

The original action has not seen much movement lately
and the PR adds good improvements.

Keeping the code in this repository removes the dependency.
@sgaist
Copy link
Contributor Author

sgaist commented Dec 11, 2025

I tested the use of the action in paketo-buildpacks/conda-env-update#464 and looks like it's working correctly.

dmikusa
dmikusa previously approved these changes Dec 11, 2025
@dmikusa
Copy link
Contributor

dmikusa commented Dec 11, 2025

Looks good, one last question. How would one go about setting the env variable to enable this option? The workflow files are managed by this repo, so where would you set that env variable to make it take effect? Would that be in the repo Settings -> Actions? Thanks

@sgaist
Copy link
Contributor Author

sgaist commented Dec 11, 2025

I knew I was missing testing something.

Well, good thing you asked, I was wrong. It's the vars context I should have used.

For the rest, yes, it should be set at the repository level.

The variables sets through GitHub repository settings
are stored in vars (which can be used to fill env).

Details:
https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#vars-context
@dmikusa dmikusa merged commit a1cd7e9 into paketo-buildpacks:main Dec 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants