Skip to content
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

✨Saving volume stats inside the shared store volume #4267

Merged

Conversation

GitHK
Copy link
Contributor

@GitHK GitHK commented May 24, 2023

What do these changes do?

It is necessary to store the state of the volumes somewhere. Since the sidecar has exclusive access to the shared store volume, it will not have any permission or ownership issues when trying to write the states there.

Contents of the SharedStore (snapshot while outputs and state are being saved):

{
  ...
  "volume_states": {
    "INPUTS": {
      "status": "CONTENT_NO_SAVE_REQUIRED",
      "last_changed": "2023-05-30T08:59:48.723425+00:00"
    },
    "SHARED_STORE": {
      "status": "CONTENT_NO_SAVE_REQUIRED",
      "last_changed": "2023-05-30T08:59:48.723459+00:00"
    },
    "OUTPUTS": {
      "status": "CONTENT_WAS_SAVED",
      "last_changed": "2023-05-30T09:00:59.297894+00:00"
    },
    "STATES": {
      "status": "CONTENT_NEEDS_TO_BE_SAVED",
      "last_changed": "2023-05-30T08:59:49.559358+00:00"
    }
  }
}

Bonus: minor models-library cleanup

Related issue/s

How to test

DevOps Checklist

@GitHK GitHK self-assigned this May 24, 2023
@GitHK GitHK added a:director-v2 issue related with the director-v2 service a:dynamic-sidecar dynamic-sidecar service changelog:✨new-feature labels May 24, 2023
@GitHK GitHK added this to the Pastel de Nata milestone May 24, 2023
@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #4267 (645369f) into master (a0c455a) will increase coverage by 7.0%.
The diff coverage is 95.2%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #4267     +/-   ##
========================================
+ Coverage    79.8%   86.9%   +7.0%     
========================================
  Files         938     818    -120     
  Lines       39877   37622   -2255     
  Branches      965     456    -509     
========================================
+ Hits        31860   32703    +843     
+ Misses       7796    4810   -2986     
+ Partials      221     109    -112     
Flag Coverage Δ
integrationtests 68.7% <100.0%> (+21.0%) ⬆️
unittests 83.4% <91.5%> (+1.6%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ages/models-library/src/models_library/services.py 94.1% <ø> (ø)
...brary/src/models_library/utils/fastapi_encoders.py 100.0% <ø> (ø)
...ore_service_dynamic_sidecar/models/shared_store.py 90.1% <85.7%> (ø)
...models-library/src/models_library/aiodocker_api.py 74.0% <100.0%> (-1.0%) ⬇️
...ages/models-library/src/models_library/clusters.py 100.0% <100.0%> (ø)
...tion_services_catalog/services/iter_sensitivity.py 48.1% <100.0%> (ø)
...dels-library/src/models_library/sidecar_volumes.py 100.0% <100.0%> (ø)
...rc/models_library/utils/database_models_factory.py 88.4% <100.0%> (ø)
...r_v2/modules/dynamic_sidecar/api_client/_public.py 92.7% <100.0%> (+53.8%) ⬆️
...tor_v2/modules/dynamic_sidecar/api_client/_thin.py 100.0% <100.0%> (+40.9%) ⬆️
... and 4 more

... and 295 files with indirect coverage changes

@GitHK GitHK marked this pull request as ready for review May 30, 2023 08:49
@GitHK GitHK requested review from sanderegg and pcrespov as code owners May 30, 2023 08:49
@GitHK GitHK requested a review from matusdrobuliak66 as a code owner May 30, 2023 08:49
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.

nice! some comments

@GitHK GitHK requested a review from sanderegg May 30, 2023 11:33
@codeclimate
Copy link

codeclimate bot commented Jun 1, 2023

Code Climate has analyzed commit 645369f and detected 0 issues on this pull request.

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Jun 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@GitHK GitHK merged commit a6cfd3e into ITISFoundation:master Jun 1, 2023
@GitHK GitHK deleted the pr-osparc-volume-status-in-state-volume branch June 1, 2023 08:14
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 14, 2023
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:director-v2 issue related with the director-v2 service a:dynamic-sidecar dynamic-sidecar service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

volumes state is stored in the state volume inside the dy-sidecar
3 participants