Skip to content

Conversation

@GitHK
Copy link
Contributor

@GitHK GitHK commented May 9, 2025

What do these changes do?

This is part of a series of PRs which will migrate the entire interface of the dynamic-sidecar to RPC. The idea is to drop the REST interface when dropping the scheduler from director-v2.

NOTE:

Related issue/s

How to test

Dev-ops

@GitHK GitHK self-assigned this May 9, 2025
@GitHK GitHK added the a:dynamic-sidecar dynamic-sidecar service label May 9, 2025
@codecov
Copy link

codecov bot commented May 9, 2025

Codecov Report

Attention: Patch coverage is 56.96203% with 34 lines in your changes missing coverage. Please review.

Project coverage is 87.40%. Comparing base (e32e933) to head (c7aeb69).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7651      +/-   ##
==========================================
- Coverage   87.57%   87.40%   -0.17%     
==========================================
  Files        1804     1630     -174     
  Lines       70197    66154    -4043     
  Branches     1137      893     -244     
==========================================
- Hits        61478    57825    -3653     
+ Misses       8409     8084     -325     
+ Partials      310      245      -65     
Flag Coverage Δ
integrationtests 64.42% <77.27%> (-0.02%) ⬇️
unittests 86.56% <56.96%> (-0.24%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 93.09% <100.00%> (+<0.01%) ⬆️
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 71.66% <0.00%> (-0.36%) ⬇️
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.66% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 91.62% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 92.64% <ø> (ø)
clusters_keeper 99.25% <ø> (ø)
dask_sidecar 89.86% <ø> (ø)
datcore_adapter 98.12% <ø> (ø)
director 76.80% <ø> (ø)
director_v2 91.14% <ø> (ø)
dynamic_scheduler 96.76% <ø> (ø)
dynamic_sidecar 90.22% <100.00%> (+0.06%) ⬆️
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.63% <ø> (ø)
resource_usage_tracker 89.13% <ø> (+0.10%) ⬆️
storage 87.81% <ø> (+0.31%) ⬆️
webclient ∅ <ø> (∅)
webserver 85.85% <ø> (-0.04%) ⬇️

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 e32e933...c7aeb69. 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.

@GitHK GitHK added this to the Bazinga! milestone May 9, 2025
@GitHK GitHK requested a review from Copilot May 14, 2025 08:10
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 new RPC entry points to enable disk and volume operations in the dynamic-sidecar service, paving the way for migrating from a REST interface to a full RPC interface.

  • Added unit tests for RPC endpoints managing volumes, disk usage, and reserved disk space.
  • Refactored services and API routes to integrate the RabbitMQ RPC client.
  • Updated the shared store model to use a type alias for the compose specification.

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/unit/api/rpc/test__volumes.py Added tests validating volume state saving and error handling for invalid categories.
tests/unit/api/rpc/test__disk_usage.py Introduced tests for updating disk usage via RPC.
tests/unit/api/rpc/test__disk.py Added tests for freeing reserved disk space via RPC.
tests/unit/api/rpc/conftest.py Cleaned up and removed redundant disk usage test setups.
src/simcore_service_dynamic_sidecar/services/volumes.py Added async service to save volume state using the shared store.
src/simcore_service_dynamic_sidecar/services/disk.py Introduced a wrapper to remove reserved disk space.
src/simcore_service_dynamic_sidecar/models/shared_store.py Updated compose_spec field to use a type alias from models_library.
src/simcore_service_dynamic_sidecar/api/rpc/routes.py Registered new RPC routers for disk and volume operations.
src/simcore_service_dynamic_sidecar/api/rpc/_volumes.py Created RPC endpoint for saving volume state.
src/simcore_service_dynamic_sidecar/api/rpc/_disk_usage.py Added validate_call decorator to the disk usage update RPC endpoint.
src/simcore_service_dynamic_sidecar/api/rpc/_disk.py Exposed RPC endpoint to free reserved disk space.
src/simcore_service_dynamic_sidecar/api/rest/volumes.py Updated REST endpoint to delegate volume state saving to the new service.
src/simcore_service_dynamic_sidecar/api/rest/disk.py Adjusted REST endpoint to call the new disk service.
packages/service-library/.../volumes.py Defined RPC interface function for saving volume state using RabbitMQ.
packages/service-library/.../disk_usage.py Adjusted RPC interface for updating disk usage with inline validation.
packages/service-library/.../disk.py Created RPC interface for freeing reserved disk space.
packages/models-library/src/models_library/api_schemas_dynamic_sidecar/containers.py Added a type alias for the compose specification string.

Andrei Neagu added 2 commits May 14, 2025 10:14
@GitHK GitHK marked this pull request as ready for review May 14, 2025 08:17
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

thx

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

thanks. maybe check the pydantic-yaml library.

Andrei Neagu added 3 commits May 16, 2025 14:13
@GitHK GitHK added the 🤖-automerge marks PR as ready to be merged for Mergify label May 16, 2025
@GitHK
Copy link
Contributor Author

GitHK commented May 16, 2025

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 16, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 3595349

@sonarqubecloud
Copy link

@mergify mergify bot merged commit 3595349 into ITISFoundation:master May 19, 2025
94 of 96 checks passed
@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

🤖-automerge marks PR as ready to be merged for Mergify a:dynamic-sidecar dynamic-sidecar service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants