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

refactor: Example application with image processing workflow #263

Merged
merged 14 commits into from
Sep 5, 2023

Conversation

zeeshanlakhani
Copy link
Contributor

@zeeshanlakhani zeeshanlakhani commented Aug 27, 2023

Includes:

  • removal of libp2p record checks on scheduler (leaves it to worker)
  • update across the board toward async channels
  • resource map now includes content over the network as part of fetching
  • new fetch module
  • better use of channels to spread out work between internal and swarm events
  • websocket-relay app documentation and more

Closes #246.

@codecov
Copy link

codecov bot commented Aug 27, 2023

Codecov Report

Merging #263 (3b16d87) into main (d1ffc12) will decrease coverage by 0.32%.
The diff coverage is 59.80%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #263      +/-   ##
==========================================
- Coverage   73.07%   72.75%   -0.32%     
==========================================
  Files          65       67       +2     
  Lines        6313     6702     +389     
==========================================
+ Hits         4613     4876     +263     
- Misses       1700     1826     +126     
Files Changed Coverage Δ
homestar-runtime/src/db/schema.rs 89.28% <ø> (ø)
homestar-runtime/src/event_handler/swarm_event.rs 16.95% <0.00%> (+0.46%) ⬆️
homestar-runtime/src/main.rs 100.00% <ø> (ø)
homestar-runtime/src/network/ipfs.rs 16.66% <ø> (ø)
homestar-runtime/src/network/pubsub.rs 83.33% <ø> (ø)
homestar-runtime/src/tasks.rs 100.00% <ø> (ø)
...estar-runtime/src/test_utils/proc_macro/src/lib.rs 100.00% <ø> (ø)
homestar-runtime/src/workflow/settings.rs 90.00% <ø> (-0.91%) ⬇️
homestar-wasm/src/error.rs 0.00% <ø> (ø)
homestar-wasm/src/wasmtime/error.rs 0.00% <ø> (ø)
... and 35 more

... and 1 file with indirect coverage changes

@zeeshanlakhani zeeshanlakhani force-pushed the zl/relay-example branch 3 times, most recently from 001829d to fe2cd2f Compare August 27, 2023 21:24
@zeeshanlakhani zeeshanlakhani marked this pull request as ready for review August 27, 2023 21:25
@zeeshanlakhani zeeshanlakhani requested a review from a team as a code owner August 27, 2023 21:25
@zeeshanlakhani
Copy link
Contributor Author

@bgins is looking at a warning and a fix to activeworkflowstate for ordering of workflow plays.

Copy link
Contributor

@bgins bgins left a comment

Choose a reason for hiding this comment

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

Looks good! 🎉

Left a few comments on the example docs. As discussed, I'll look at the frontend to prevent the user from running multiple workflows at the same time.

examples/README.md Outdated Show resolved Hide resolved
examples/README.md Outdated Show resolved Hide resolved
examples/README.md Outdated Show resolved Hide resolved
examples/websocket-relay/README.md Outdated Show resolved Hide resolved
examples/websocket-relay/README.md Outdated Show resolved Hide resolved
examples/websocket-relay/README.md Outdated Show resolved Hide resolved
examples/websocket-relay/README.md Outdated Show resolved Hide resolved
examples/websocket-relay/README.md Outdated Show resolved Hide resolved
examples/websocket-relay/README.md Outdated Show resolved Hide resolved
examples/websocket-relay/README.md Outdated Show resolved Hide resolved
@zeeshanlakhani zeeshanlakhani force-pushed the zl/relay-example branch 2 times, most recently from ba96753 to da11985 Compare August 30, 2023 19:16
zeeshanlakhani and others added 14 commits September 5, 2023 12:19
Includes:

- removal of libp2p record checks on scheduler (leaves it to worker)
- update across the board toward async channels
- resource map now includes content over the network as part of fetching
- new fetch module
- better use of channels to spread out work between internal and swarm events
- websocket-relay app documentation and more
- no fmt generated files on nightly
Co-authored-by: Brian Ginsburg <7957636+bgins@users.noreply.github.com>
Signed-off-by: Zeeshan Lakhani <zeeshan.lakhani@gmail.com>
# Description

This PR implements the following changes:

- [x] Only render nodes when previous task has completed
- [x] Remove task out-of-order error case
- [x] Disable a workflow play button when the other workflow is active
- [x] Prevent multiple runs of a workflow when it is active (spinner
that replaces play button is not clickable)
- [x] Rename `task.active` to `task.selected` to better indicate that
this is UI state
- [x] Remove receipt and instruction CID from completed task dropdown 

We had an issue where Firefox would receive receipts over the Websocket
channel nearly simultaneously which resulted in out-of-order errors.
This PR fixes that by delaying the rendering of nodes until each
previous task has completed and removing the error case.

## Type of change

- [x] Bug fix (non-breaking change that fixes an issue)
- [x] Refactor 

## Test plan (required)

The play button should be disabled when the other workflow is running.
The button should not handle click events when in a spinner state.

Test in Firefox. No errors should be present and workflows should run
and render as expected.
@zeeshanlakhani zeeshanlakhani merged commit 8009ff0 into main Sep 5, 2023
22 checks passed
@zeeshanlakhani zeeshanlakhani deleted the zl/relay-example branch September 5, 2023 17:22
@release-plz-ipvm-wg release-plz-ipvm-wg bot mentioned this pull request Oct 9, 2023
@release-plz-ipvm-wg release-plz-ipvm-wg bot mentioned this pull request Jan 19, 2024
@release-plz-ipvm-wg release-plz-ipvm-wg bot mentioned this pull request Jan 19, 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.

Example application: Websocket Relay App
2 participants