-
Notifications
You must be signed in to change notification settings - Fork 32
⚗️Dask-sidecar: print file contents or partial contents #7834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a debugging feature to print file contents (or a truncated version) before uploading files to S3 in the Dask-sidecar service. Key changes include:
- Adding the log_partial_file_content function to log file content.
- Including new tests for log_partial_file_content to handle different file scenarios.
- Updating the computational sidecar to call log_partial_file_content during output processing.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| services/dask-sidecar/tests/unit/test_utils_files.py | Added tests to verify logging functionality for file content (full/truncated/non-existent cases). |
| services/dask-sidecar/src/simcore_service_dask_sidecar/utils/files.py | Introduced log_partial_file_content to log partial file contents with truncation logic. |
| services/dask-sidecar/src/simcore_service_dask_sidecar/computational_sidecar/core.py | Integrated file content logging into output file processing and adjusted related constants. |
| .vscode/settings.template.json | Updated extraPaths for proper analysis, supporting additional library paths. |
Comments suppressed due to low confidence (2)
services/dask-sidecar/src/simcore_service_dask_sidecar/utils/files.py:338
- Currently there is no test case verifying that a negative value for max_chars correctly raises a ValueError. Consider adding a test to ensure this behavior is covered.
if max_chars < 0:
services/dask-sidecar/src/simcore_service_dask_sidecar/utils/files.py:346
- aiofiles is used in this function but there is no corresponding import shown in the diff. Please confirm that aiofiles is imported elsewhere or add 'import aiofiles' at the top of the file to prevent runtime errors.
async with aiofiles.open(src_path, encoding="utf-8") as f:
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7834 +/- ##
===========================================
- Coverage 85.26% 65.82% -19.44%
===========================================
Files 1851 720 -1131
Lines 71968 34487 -37481
Branches 1218 176 -1042
===========================================
- Hits 61361 22702 -38659
- Misses 10265 11727 +1462
+ Partials 342 58 -284
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
54bffca to
6093684
Compare
6093684 to
baa11ea
Compare
|
…Foundation#7834)" This reverts commit 7cbacf2.



What do these changes do?
in a bid to find the culprit of ITISFoundation/osparc-issues#1889 this PR adds a debug log of the file contents prior to uploading it to S3.
Related issue/s
How to test
Dev-ops