Skip to content

Conversation

@sanderegg
Copy link
Member

@sanderegg sanderegg commented Jun 5, 2025

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

@sanderegg sanderegg added this to the Bazinga! milestone Jun 5, 2025
@sanderegg sanderegg requested review from Copilot and wvangeit June 5, 2025 14:27
@sanderegg sanderegg self-assigned this Jun 5, 2025
@sanderegg sanderegg added t:maintenance Some planned maintenance work a:dask-service Any of the dask services: dask-scheduler/sidecar or worker labels Jun 5, 2025
Copy link
Contributor

Copilot AI left a 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
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 65.82%. Comparing base (fb7a78d) to head (baa11ea).
Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (fb7a78d) and HEAD (baa11ea). Click for more details.

HEAD has 30 uploads less than BASE
Flag BASE (fb7a78d) HEAD (baa11ea)
unittests 31 1
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     
Flag Coverage Δ
integrationtests 64.27% <ø> (+0.11%) ⬆️
unittests 91.60% <88.00%> (+6.63%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 77.10% <ø> (-7.95%) ⬇️
agent ∅ <ø> (∅)
api_server ∅ <ø> (∅)
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar 91.60% <88.00%> (-0.20%) ⬇️
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 78.00% <ø> (-13.05%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 88.34% <ø> (-1.74%) ⬇️
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 56.40% <ø> (-22.36%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb7a78d...baa11ea. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sanderegg sanderegg force-pushed the debugging/add-logs branch 2 times, most recently from 54bffca to 6093684 Compare June 5, 2025 15:40
@sanderegg sanderegg force-pushed the debugging/add-logs branch from 6093684 to baa11ea Compare June 5, 2025 16:53
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2025

@sanderegg sanderegg merged commit 7cbacf2 into ITISFoundation:master Jun 5, 2025
92 of 95 checks passed
@sanderegg sanderegg deleted the debugging/add-logs branch June 5, 2025 17:32
sanderegg added a commit to sanderegg/osparc-simcore that referenced this pull request Jun 6, 2025
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:dask-service Any of the dask services: dask-scheduler/sidecar or worker t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants