Skip to content

Allow configuring cleanup of temporary files #37

@mx-psi

Description

@mx-psi

I am trying to setup codspeed on a multi-module Go repository. On a ubuntu-latest Github runner and I am running into 'no space left on device' errors (full logs).

failed to write raw results: write /tmp/profile.6zEGSoeXO7.out/raw_results/649cad625b718acc06eb36b981d8502f.json: no space left on device
cat: write error: No space left on device

This is intentional, see

// We don't want to spend time cleanup any temporary files since the code is only
// run on CI servers which clean up themselves.
// However, when running tests we don't want to fill the disk with temporary files, which
// can cause the tests to fail due to lack of disk space.
if cfg!(not(test)) {
target_dir.disable_cleanup(true);
}

but unfortunately this is not workable if you need to codspeed run hundreds of times because you have a monorepo (e.g. another repository that I want to use Codspeed on would have to run codspeed run 230+ times). ubuntu-latest seems to have 14GB storage so codspeed seems to be a bit excessive in the amount of temp files it keeps around.

A Linux workaround is to just do rm -rf /tmp/* || true but this tries to delete all temp files, including non-codspeed ones (e.g. systemd ones), and so it would be nice if codspeed-go had this option and it could be passed down by the codspeed runner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions