Skip to content

pipeline-manager: rust compilation cleans up target#6410

Merged
snkas merged 1 commit into
mainfrom
compiler-cleanup
Jun 11, 2026
Merged

pipeline-manager: rust compilation cleans up target#6410
snkas merged 1 commit into
mainfrom
compiler-cleanup

Conversation

@snkas

@snkas snkas commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

The Rust compilation cleanup now checks whether the disk on which it takes place it about to reach a usage threshold:

  • If it exceeds 70%, a warning is printed.
  • If it exceeds 90%, the target directory is removed if it is 5% or more of the total disk space. The compiler server is restarted if the form factor supports it. The OSS edition form factor does not support this restart behavior, and as such it will mean that it will need to recompile from scratch. A warning is printed to inform of this, as an indication to increase the disk size.

This behavior is currently gated behind the unstable feature rust_compiler_full_cleanup, and thus needs to be explicitly activated.

PR information

  • Manually tested
  • No backward incompatible changes

@gz gz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

awesome;

what's the impact on restarting things when someone has multiple compiler server? (IIRC server-0 is special in this model -- wonder what if it receives a binary during restart?)

Comment thread crates/pipeline-manager/src/compiler/rust_compiler.rs
Comment thread crates/pipeline-manager/src/compiler/rust_compiler.rs Outdated
Comment thread crates/pipeline-manager/src/compiler/rust_compiler.rs Outdated
@snkas

snkas commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

what's the impact on restarting things when someone has multiple compiler server? (IIRC server-0 is special in this model -- wonder what if it receives a binary during restart?)

It'll need some more downstream testing before I merge this PR.

Restarting is the same as it temporarily going down (it goes through continuous cycle of compile -> cleanup -> compile -> cleanup -> ...). Pipeline binaries are not stored in target directory, so cleanup of that should not be affected.

@snkas snkas force-pushed the compiler-cleanup branch 2 times, most recently from ca76503 to 627be02 Compare June 9, 2026 13:50
@snkas

snkas commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

A future work is adding compiler server remaining disk space to its health check.

@snkas

snkas commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

CI run: #6410

@snkas snkas force-pushed the compiler-cleanup branch from ccd90cf to ad3ca20 Compare June 10, 2026 12:23
@snkas

snkas commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

The Rust compilation cleanup now checks whether the disk on which it
takes place it about to reach a usage threshold:

- If it exceeds 70%, a warning is printed.
- If it exceeds 90%, the `target` directory is removed if it is 5% or
  more of the total disk space. The compiler server is restarted if the
  form factor supports it. The OSS edition form factor does not support
  this restart behavior, and as such it will mean that it will need to
  recompile from scratch. A warning is printed to inform of this, as an
  indication to increase the disk size.

This behavior is currently gated behind the unstable feature
`rust_compiler_full_cleanup`, and thus needs to be explicitly activated.

Signed-off-by: Simon Kassing <simon.kassing@feldera.com>
@snkas snkas force-pushed the compiler-cleanup branch from 460aa60 to cfc5cd2 Compare June 11, 2026 09:57
@snkas snkas added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit 1268c49 Jun 11, 2026
40 checks passed
@snkas snkas deleted the compiler-cleanup branch June 11, 2026 14:13
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.

3 participants