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

🎨 publish port events to frontend #6396

Merged
merged 31 commits into from
Sep 25, 2024

Conversation

GitHK
Copy link
Contributor

@GitHK GitHK commented Sep 19, 2024

What do these changes do?

To provide better feedback for users in the UI we are adding notifications for ports during the runtime of the platform. Notifications are send from the backend for each individual port. Even when all ports are required to download/upload notifications are sent one port at a time.

The only notifications that make sense are:

  • input port when it downloads data (we never upload data form an input port)
  • output port when it uploads data (outputs are downloaded and they have a progress bar when the service starts)

Input ports

Notification message for each input port download:
42["stateInputPorts",{"project_id":"b4a03e00-7691-11ef-a0a5-0242ac14001a","node_id":"81e4a4d9-e8f8-4816-ad22-58ce586f46e5","port_key":"input_20","status":"DOWNLOAD_FINISHED_SUCCESSFULLY"}].

It can have one of the following status states:

DOWNLOAD_STARTED
DOWNLOAD_WAS_ABORTED
DOWNLOAD_FINISHED_SUCCESSFULLY
DOWNLOAD_FINISHED_WITH_ERRROR

Output ports

Notification message for each output port upload:
42["stateOutputPorts",{"project_id":"b4a03e00-7691-11ef-a0a5-0242ac14001a","node_id":"81e4a4d9-e8f8-4816-ad22-58ce586f46e5","port_key":"output_2","status":"UPLOAD_STARTED"}].

It can have one of the following status states:

UPLOAD_STARTED
UPLOAD_WAS_ABORTED
UPLOAD_FINISHED_SUCCESSFULLY
UPLOAD_FINISHED_WITH_ERRROR

Related issue/s

How to test

Dev-ops checklist

@GitHK GitHK self-assigned this Sep 19, 2024
@GitHK GitHK added this to the MartinKippenberger milestone Sep 19, 2024
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 73.58491% with 42 lines in your changes missing coverage. Please review.

Project coverage is 86.5%. Comparing base (cafbf96) to head (886b151).
Report is 580 commits behind head on master.

Files with missing lines Patch % Lines
...mcore_service_dynamic_sidecar/modules/nodeports.py 23.8% 32 Missing ⚠️
...-sdk/src/simcore_sdk/node_ports_v2/nodeports_v2.py 47.3% 8 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6396      +/-   ##
=========================================
+ Coverage    84.5%   86.5%    +1.9%     
=========================================
  Files          10    1244    +1234     
  Lines         214   54568   +54354     
  Branches       25     870     +845     
=========================================
+ Hits          181   47240   +47059     
- Misses         23    7210    +7187     
- Partials       10     118     +108     
Flag Coverage Δ
unittests 86.5% <73.5%> (+1.9%) ⬆️

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

Files with missing lines Coverage Δ
...odels_library/api_schemas_dynamic_sidecar/ports.py 100.0% <100.0%> (ø)
...ls_library/api_schemas_dynamic_sidecar/socketio.py 100.0% <100.0%> (ø)
...namic_sidecar/api/containers_long_running_tasks.py 100.0% <ø> (ø)
...imcore_service_dynamic_sidecar/core/application.py 98.2% <100.0%> (ø)
...vice_dynamic_sidecar/modules/long_running_tasks.py 94.4% <100.0%> (ø)
..._dynamic_sidecar/modules/notifications/__init__.py 100.0% <100.0%> (ø)
...ecar/modules/notifications/_notifications_ports.py 100.0% <100.0%> (ø)
...les/notifications/_notifications_system_monitor.py 100.0% <100.0%> (ø)
...dynamic_sidecar/modules/notifications/_notifier.py 100.0% <100.0%> (ø)
...ce_dynamic_sidecar/modules/notifications/_setup.py 100.0% <100.0%> (ø)
... and 6 more

... and 1214 files with indirect coverage changes

@GitHK GitHK marked this pull request as ready for review September 20, 2024 07:34
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, left some suggests to consider

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.

a few comments. Good luck with it ! see you later!

@GitHK GitHK enabled auto-merge (squash) September 23, 2024 14:27
Copy link

@GitHK GitHK merged commit d49a4c6 into ITISFoundation:master Sep 25, 2024
56 of 57 checks passed
@GitHK GitHK deleted the pr-osparc-port-change-notifications branch September 25, 2024 05:56
jsaq007 pushed a commit to jsaq007/osparc-simcore that referenced this pull request Sep 25, 2024
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-simcore that referenced this pull request Oct 2, 2024
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.

backend provides port notifications
4 participants