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

✨ Link to dispatch study with file-only and 🐛 fixes download link #4043

Merged
merged 40 commits into from
May 3, 2023

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Mar 29, 2023

What do these changes do?

  • view links can now dispatch a new study with a single file-picker that can pull data from the portal (or any other download link)
    • limited to registered users (i.e. user, tester or admin but not guests)
    • one file at a time
  • ♻️ refactors simcore_service_webserver/studies_dispatcher plugin
    • better error definitions and handling (see _errors.py and _constants.py)
    • ⚠️ adds env-vars
      • STUDIES_DEFAULT_SERVICE_THUMBNAIL, STUDIES_DEFAULT_FILE_THUMBNAIL for default thumbnails
      • STUDIES_MAX_FILE_SIZE_ALLOWED max file size
      • For the moment we will use defaults in the code i.e. no changes in osparc-ops required!
  • 🐛 Fixes download_link decoding that causes Portal "viewers" sometimes don't get the file in the FilePicker #3951

Related issue/s

How to test

make devenv
source .venv/bin/activate
cd services/web/server
make install-dev
pytest -vv tests/unit/**/test_*dispatch*.py

Manual exploratory testing

make build
make up-devel

Login and try the following links to dispatch a study with ...

@pcrespov pcrespov self-assigned this Mar 29, 2023
@pcrespov pcrespov added the a:webserver issue related to the webserver service label Mar 29, 2023
@pcrespov pcrespov added this to the Mithril milestone Mar 29, 2023
@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Merging #4043 (4fb47ca) into master (5050682) will decrease coverage by 0.6%.
The diff coverage is 81.5%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #4043     +/-   ##
========================================
- Coverage    85.5%   84.9%   -0.6%     
========================================
  Files         957     885     -72     
  Lines       41448   40064   -1384     
  Branches      954     824    -130     
========================================
- Hits        35467   34044   -1423     
- Misses       5765    5830     +65     
+ Partials      216     190     -26     
Flag Coverage Δ
integrationtests 62.0% <52.5%> (-5.4%) ⬇️
unittests 82.9% <81.5%> (+0.5%) ⬆️

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

Impacted Files Coverage Δ
...c/models_library/utils/pydantic_tools_extension.py 0.0% <0.0%> (ø)
...rary/src/servicelib/aiohttp/requests_validation.py 86.3% <63.6%> (-3.9%) ⬇️
...core_service_webserver/studies_dispatcher/_core.py 77.7% <63.6%> (-2.6%) ⬇️
...es/web/server/src/simcore_service_webserver/cli.py 47.0% <66.6%> (ø)
...ce_webserver/studies_dispatcher/_studies_access.py 90.5% <70.0%> (ø)
...ebserver/studies_dispatcher/_redirects_handlers.py 85.7% <85.7%> (ø)
..._service_webserver/studies_dispatcher/_projects.py 93.8% <86.4%> (+0.4%) ⬆️
...e_service_webserver/studies_dispatcher/_catalog.py 95.6% <87.5%> (+0.2%) ⬆️
...ore_service_webserver/studies_dispatcher/_users.py 85.0% <87.5%> (+0.6%) ⬆️
...ice_webserver/studies_dispatcher/_rest_handlers.py 91.5% <91.6%> (ø)
... and 5 more

... and 111 files with indirect coverage changes

@pcrespov pcrespov changed the title WIP: Is683/file picker only WIP: Is682/file picker only Mar 29, 2023
@sanderegg sanderegg modified the milestones: Mithril, The Next Milestone Mar 31, 2023
@pcrespov pcrespov force-pushed the is683/file-picker-only branch 5 times, most recently from 33ce077 to 9a66d1b Compare May 2, 2023 20:16
@pcrespov pcrespov changed the title WIP: Is682/file picker only ✨ Is682/file picker only and 🐛 fixes download link May 2, 2023
@pcrespov pcrespov changed the title ✨ Is682/file picker only and 🐛 fixes download link ✨ Link to dispatch study with file-only and 🐛 fixes download link May 2, 2023
@pcrespov pcrespov marked this pull request as ready for review May 2, 2023 20:18
Copy link
Member

@mrnicegyu11 mrnicegyu11 left a comment

Choose a reason for hiding this comment

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

Didnt check everything in Detail, Just some comments. Thanks a lot!

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

Nice, please have a look at some doubts

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.

👍

@pcrespov pcrespov force-pushed the is683/file-picker-only branch from 9a66d1b to f48877c Compare May 3, 2023 08:48
@pcrespov pcrespov requested a review from GitHK May 3, 2023 08:52
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

👍

@codeclimate
Copy link

codeclimate bot commented May 3, 2023

Code Climate has analyzed commit 4fb47ca and detected 0 issues on this pull request.

View more on Code Climate.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 3, 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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mguidon
Copy link
Member

mguidon commented Jun 28, 2023

We need another iteration. Dominic will provide an nicer looking icon and we have to adapt the text and explain who can get an account (on the resources&tool page as well as on the panda page). Also, synchronize language with the Open in osparc button
@ignapas @elisabettai This should be done in the QA period until Friday, July 07.

@ignapas
Copy link
Contributor

ignapas commented Jul 11, 2023

We need another iteration. Dominic will provide an nicer looking icon and we have to adapt the text and explain who can get an account (on the resources&tool page as well as on the panda page). Also, synchronize language with the Open in osparc button @ignapas @elisabettai This should be done in the QA period until Friday, July 07.

Changes were implemented and ready to test in staging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Portal "viewers" sometimes don't get the file in the FilePicker M7 Pulling files from the Portal
8 participants