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

Snapshots in frontend #2474

Merged
merged 160 commits into from
Aug 26, 2021
Merged

Conversation

odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Aug 9, 2021

What do these changes do?

This PR brings the Snapshots concept to the frontend:

  • Testers can manually create snapshots of the study by clicking the "Take snapshot" button in the workbench toolbar
  • If a study has snapshots, a "Snapshot" button will appear in the workbench toolbar and all the snapshots will be listed
  • From the snapshots view one can go to the snapshot study.

... and removes the logic from the frontend for creating parameters and sweeps

intervals

Related issue/s

related to ITISFoundation/osparc-issues#328
related to #2392

How to test

Checklist

@odeimaiz odeimaiz added the a:frontend issue affecting the front-end (area group) label Aug 9, 2021
@odeimaiz odeimaiz added this to the Chevrotain milestone Aug 9, 2021
@odeimaiz odeimaiz self-assigned this Aug 9, 2021
@codecov
Copy link

codecov bot commented Aug 9, 2021

Codecov Report

Merging #2474 (f772413) into master (074f03a) will increase coverage by 5.1%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #2474     +/-   ##
========================================
+ Coverage    71.1%   76.3%   +5.1%     
========================================
  Files         600     600             
  Lines       22806   22806             
  Branches     2202    2202             
========================================
+ Hits        16228   17405   +1177     
+ Misses       6071    4815   -1256     
- Partials      507     586     +79     
Flag Coverage Δ
integrationtests 67.0% <ø> (-0.9%) ⬇️
unittests 70.4% <ø> (ø)

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

Impacted Files Coverage Δ
...ages/service-library/src/servicelib/aiopg_utils.py 87.7% <0.0%> (-3.1%) ⬇️
..._director_v2/modules/dynamic_sidecar/docker_api.py 85.8% <0.0%> (-0.7%) ⬇️
.../director/src/simcore_service_director/producer.py 61.6% <0.0%> (+0.2%) ⬆️
...re_service_webserver/projects/projects_handlers.py 82.5% <0.0%> (+0.4%) ⬆️
...e_service_director_v2/models/domains/comp_tasks.py 100.0% <0.0%> (+1.3%) ⬆️
...-v2/src/simcore_service_director_v2/core/errors.py 69.7% <0.0%> (+2.3%) ⬆️
.../server/src/simcore_service_webserver/users_api.py 91.5% <0.0%> (+2.5%) ⬆️
...server/src/simcore_service_webserver/groups_api.py 91.6% <0.0%> (+2.5%) ⬆️
.../simcore_service_webserver/projects/projects_db.py 90.2% <0.0%> (+2.5%) ⬆️
...rver/src/simcore_service_webserver/scicrunch/db.py 48.5% <0.0%> (+2.8%) ⬆️
... and 62 more

@odeimaiz odeimaiz changed the title WIP: Snapshots in frontend Snapshots in frontend Aug 23, 2021
@odeimaiz odeimaiz marked this pull request as ready for review August 23, 2021 06:52
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.

When I try to create a snapshot I get this 404 from the backend.

"GET /v0/projects/efa37dbe-04a7-11ec-a0c1-02420a000008/snapshots HTTP/1.1" 404 378 [7884us]

@odeimaiz
Copy link
Member Author

When I try to create a snapshot I get this 404 from the backend.

"GET /v0/projects/efa37dbe-04a7-11ec-a0c1-02420a000008/snapshots HTTP/1.1" 404 378 [7884us]

And what does the backend say?

@GitHK
Copy link
Contributor

GitHK commented Aug 25, 2021

When I try to create a snapshot I get this 404 from the backend.

"GET /v0/projects/efa37dbe-04a7-11ec-a0c1-02420a000008/snapshots HTTP/1.1" 404 378 [7884us]

And what does the backend say?

That's from the backend, nothing more in the logs.

@odeimaiz
Copy link
Member Author

When I try to create a snapshot I get this 404 from the backend.

"GET /v0/projects/efa37dbe-04a7-11ec-a0c1-02420a000008/snapshots HTTP/1.1" 404 378 [7884us]

And what does the backend say?

That's from the backend, nothing more in the logs.

ok... let's see if it's only you

@sanderegg
Copy link
Member

Just as a note:
one need to set CATALOG_DEV_FEATURES_ENABLED=1 in the .env file before testing

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.

tested. looks very nice.

One thing I am not sure if that is expected. When I create a snapshot I get a POST 404. is that expected?
I have set in .env CATALOG_DEV_FEATURES_ENABLED=1 is there anything else to be done?

The error is the following:
http://192.168.1.20.nip.io:9081/v0/projects/e255fa2c-0634-11ec-bfb1-02420a000099/snapshots?snapshot_label=let%27s%20create%20snapshots
{"data": null, "error": {"logs": [{"message": "Not Found", "level": "ERROR", "logger": "user"}], "errors": [{"code": "HTTPNotFound", "message": "Not Found", "resource": null, "field": null}], "status": 404}}

And re-opening the same study gives me the same error that @GitHK reported. so the backend is not enabled or is this something else?

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.

Ok, so it works. Maybe for next time it might be useful for reviewer to add the following instructions in "how to test":

echo WEBSERVER_DEV_FEATURES_ENABLED=1 >> .env
echo CATALOG_DEV_FEATURES_ENABLED=1 >> .env

now everything seems to work pretty nicely!!

@odeimaiz
Copy link
Member Author

Ok, so it works. Maybe for next time it might be useful for reviewer to add the following instructions in "how to test":

echo WEBSERVER_DEV_FEATURES_ENABLED=1 >> .env
echo CATALOG_DEV_FEATURES_ENABLED=1 >> .env

now everything seems to work pretty nicely!!

Thanks Sylvain 💪, I don't think the CATALOG flag has to be set to 1 for this PR, but, anyway, it would be even better if all the devs flags would automatically be set to 1 in master and dev deployments.

@odeimaiz odeimaiz merged commit bb74fb2 into ITISFoundation:master Aug 26, 2021
@odeimaiz odeimaiz deleted the feature/snapshots-only branch April 21, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:frontend issue affecting the front-end (area group)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants