KPMP 6555 dont copy when full#170
Conversation
WalkthroughThe ChangesDisk Space Check in DLUWatcher
Docker Image Tag Bump
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 27890c67-938a-4a3e-bfda-ac82355bd363
📒 Files selected for processing (2)
.github/workflows/build-libra.ymldata_management/watch_files.py
| if available_space < required_space or source_size == 0: | ||
| error_msg = (f"Error: Insufficient disk space for package {package_id}. " | ||
| f"Required: {self.format_size(required_space)}, " | ||
| f"Available: {self.format_size(available_space)}. Skipping.") | ||
| logger.warning(error_msg) | ||
| self.dlu_management.update_dlu_package(package_id, { "globus_dlu_status": f"Error: Insufficient disk space for package {package_id}" }) | ||
| return False |
There was a problem hiding this comment.
Avoid classifying empty source directories as disk-space failures.
On Line 94, source_size == 0 is treated as “insufficient disk space,” and Line 99 persists that status. That bypasses the existing directory-validity path and stores the wrong failure reason. Because package pickup filters on globus_dlu_status (non-NULL excluded), this can incorrectly gate retries/triage.
Proposed fix
- if available_space < required_space or source_size == 0:
+ if available_space < required_space:
error_msg = (f"Error: Insufficient disk space for package {package_id}. "
f"Required: {self.format_size(required_space)}, "
f"Available: {self.format_size(available_space)}. Skipping.")📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if available_space < required_space or source_size == 0: | |
| error_msg = (f"Error: Insufficient disk space for package {package_id}. " | |
| f"Required: {self.format_size(required_space)}, " | |
| f"Available: {self.format_size(available_space)}. Skipping.") | |
| logger.warning(error_msg) | |
| self.dlu_management.update_dlu_package(package_id, { "globus_dlu_status": f"Error: Insufficient disk space for package {package_id}" }) | |
| return False | |
| if available_space < required_space: | |
| error_msg = (f"Error: Insufficient disk space for package {package_id}. " | |
| f"Required: {self.format_size(required_space)}, " | |
| f"Available: {self.format_size(available_space)}. Skipping.") | |
| logger.warning(error_msg) | |
| self.dlu_management.update_dlu_package(package_id, { "globus_dlu_status": f"Error: Insufficient disk space for package {package_id}" }) | |
| return False |
Summary by CodeRabbit
Chores
Bug Fixes