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

✨ Add ENV to prevent copying if project too large (⚠️ devops) #3286

Conversation

sanderegg
Copy link
Member

@sanderegg sanderegg commented Aug 24, 2022

What do these changes do?

To prevent unnecessary problems a check on the project total data size is done and prevents a user to copy enormous amount of data that might lead to issues in the osparc platform.

The idea of this ENV is to allow to progressively increase that limit based on tests.

⚠️ devops:

  • new ENV PROJECTS_MAX_COPY_SIZE_BYTES contains the maximum amount in bytes of a project that can be copied (default is currently set to 30GB)

Related issue/s

related to ITISFoundation/osparc-issues#558

How to test

Checklist

@sanderegg sanderegg added this to the Brutalism milestone Aug 24, 2022
@sanderegg sanderegg self-assigned this Aug 24, 2022
@sanderegg sanderegg force-pushed the enhancement/prevent_copying_if_project_too_large branch from a253414 to c854258 Compare August 24, 2022 20:32
@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #3286 (90fb73c) into master (d357e9b) will decrease coverage by 2.3%.
The diff coverage is 50.9%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #3286     +/-   ##
========================================
- Coverage    83.2%   80.9%   -2.4%     
========================================
  Files         682     722     +40     
  Lines       30068   30760    +692     
  Branches     3841    3952    +111     
========================================
- Hits        25044   24888    -156     
- Misses       4227    5075    +848     
  Partials      797     797             
Flag Coverage Δ
integrationtests 61.5% <43.3%> (-4.9%) ⬇️
unittests 78.1% <50.9%> (-1.4%) ⬇️

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

Impacted Files Coverage Δ
...erver/src/simcore_service_webserver/storage_api.py 40.6% <28.5%> (-10.3%) ⬇️
...rvice_webserver/projects/projects_handlers_crud.py 87.2% <83.3%> (-0.2%) ⬇️
.../simcore_service_webserver/application_settings.py 95.8% <100.0%> (+0.7%) ⬆️
...r/src/simcore_service_webserver/projects/plugin.py 100.0% <100.0%> (ø)
...re_service_webserver/projects/projects_settings.py 100.0% <100.0%> (ø)
...tor_v2/modules/dynamic_sidecar/scheduler/events.py 33.0% <0.0%> (-58.4%) ⬇️
...ules/dynamic_sidecar/docker_service_specs/proxy.py 53.8% <0.0%> (-46.2%) ⬇️
.../modules/dynamic_sidecar/scheduler/events_utils.py 53.1% <0.0%> (-40.7%) ⬇️
...s/dynamic_sidecar/docker_service_specs/settings.py 34.2% <0.0%> (-36.4%) ⬇️
...v2/modules/dynamic_sidecar/docker_compose_specs.py 67.4% <0.0%> (-32.6%) ⬇️
... and 126 more

@sanderegg sanderegg changed the title ✨ Add ENV to prevent copying if project too large ✨ Add ENV to prevent copying if project too large (⚠️ devops) Aug 25, 2022
@sanderegg sanderegg marked this pull request as ready for review August 25, 2022 11:28
@sanderegg sanderegg requested a review from mguidon August 25, 2022 11:28
Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

the js part looks awesome 👌

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.

Great job!
Some comments below for your consideration :-)

@sanderegg sanderegg force-pushed the enhancement/prevent_copying_if_project_too_large branch from d385380 to 2da0ae0 Compare August 26, 2022 06:52
@sonarqubecloud
Copy link

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.0% 0.0% Duplication

@sanderegg sanderegg merged commit 68a9508 into ITISFoundation:master Aug 26, 2022
@sanderegg sanderegg deleted the enhancement/prevent_copying_if_project_too_large branch August 26, 2022 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants