Skip to content

feat(fileTransfer): limit the file size to the configured free space#749

Open
joshuachp wants to merge 1 commit intoedgehog-device-manager:mainfrom
joshuachp:push-rnzntxnmvmzp
Open

feat(fileTransfer): limit the file size to the configured free space#749
joshuachp wants to merge 1 commit intoedgehog-device-manager:mainfrom
joshuachp:push-rnzntxnmvmzp

Conversation

@joshuachp
Copy link
Copy Markdown
Collaborator

Check that a file would not surpass the configured reserved free space
on the device.

@joshuachp joshuachp requested review from harlem88 and lucaato and removed request for lucaato April 22, 2026 08:17
@joshuachp joshuachp force-pushed the push-rnzntxnmvmzp branch 16 times, most recently from 3c29aed to 81db1e3 Compare April 27, 2026 15:21
Comment thread src/file_transfer/file_system/store/mod.rs Outdated
@joshuachp joshuachp force-pushed the push-rnzntxnmvmzp branch 2 times, most recently from f06a8b3 to acb3ef6 Compare April 28, 2026 08:05
@joshuachp joshuachp requested a review from lucaato April 28, 2026 08:06
@joshuachp joshuachp force-pushed the push-rnzntxnmvmzp branch 6 times, most recently from fdc4d5e to 8cfdec3 Compare April 28, 2026 14:48
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 96.22642% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.8%. Comparing base (8106614) to head (90912c9).

Files with missing lines Patch % Lines
src/file_transfer/file_system/store/mod.rs 96.2% 1 Missing ⚠️
src/file_transfer/interface/file.rs 90.0% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #749   +/-   ##
=====================================
  Coverage   81.8%   81.8%           
=====================================
  Files        141     142    +1     
  Lines      19641   19665   +24     
=====================================
+ Hits       16075   16099   +24     
  Misses      3566    3566           
Files with missing lines Coverage Δ
src/file_transfer/config.rs 62.0% <100.0%> (+2.4%) ⬆️
src/file_transfer/file_system/store/unix.rs 100.0% <100.0%> (ø)
src/file_transfer/file_system/stream/unix.rs 100.0% <100.0%> (ø)
src/file_transfer/mod.rs 85.6% <100.0%> (ø)
src/file_transfer/file_system/store/mod.rs 86.8% <96.2%> (ø)
src/file_transfer/interface/file.rs 67.6% <90.0%> (-0.4%) ⬇️

... and 1 file with indirect coverage changes

Components Coverage Δ
runtime 79.9% <96.2%> (+<0.1%) ⬆️
containers 88.3% <ø> (ø)
forwarder 93.3% <ø> (ø)

Comment thread src/file_transfer/file_system/store/windows.rs Outdated
Comment thread src/file_transfer/file_system/store/windows.rs
Comment thread src/file_transfer/file_system/store/windows.rs Outdated
Comment thread src/file_transfer/file_system/store/windows.rs Outdated
@joshuachp joshuachp requested a review from lucaato April 29, 2026 10:54
Check that a file would not surpass the configured reserved free space
on the device.

Signed-off-by: Joshua Chapman <joshua.chapman@secomind.com>
size: i64,
}

impl StoredFile<String> {
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.

This was useful to avoid extra allocations when notifying created files in the finalize_write. Are you sure this is worth it ? It wasn't complicating the code all that much.

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