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 redux for handling data-layer ws (re)connection #644

Merged
merged 10 commits into from
Jun 20, 2023
Merged

Conversation

gonpombo8
Copy link
Contributor

@gonpombo8 gonpombo8 commented Jun 13, 2023

Removed dataLayer from SDKContextValue. Now it lives in the store.

Reconnecting

image

Disconnected. No retries after 5 times

image

@gonpombo8 gonpombo8 force-pushed the feat/reconnect-ws branch from aea68df to 8b9722d Compare June 13, 2023 19:37
@@ -12,9 +12,9 @@ export async function consumeAllMessagesInto(
}
}
} catch (err) {
debugger
// debugger
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: handle this reconnection so we can continue sending/receiving messages

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 13, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2ed8df9
Status: ✅  Deploy successful!
Preview URL: https://9ac86317.js-sdk-toolchain.pages.dev
Branch Preview URL: https://feat-reconnect-ws.js-sdk-toolchain.pages.dev

View logs

@gonpombo8 gonpombo8 marked this pull request as ready for review June 13, 2023 19:41
@github-actions
Copy link
Contributor

github-actions bot commented Jun 13, 2023

Test this pull request

  • The @dcl/sdk package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/reconnect-ws/dcl-sdk-7.2.4-5326994541.commit-44d3119.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/reconnect-ws/dcl-sdk-commands-7.2.4-5326994541.commit-44d3119.tgz"
    npx $SDK_COMMANDS init
  • The @dcl/inspector package can be tested by visiting this url

    • Or by installing it via NPM
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/reconnect-ws/@dcl/inspector/dcl-inspector-7.2.4-5326994541.commit-44d3119.tgz"
  • The /changerealm command to test test in-world

    /changerealm https://sdk-team-cdn.decentraland.org/ipfs/feat/reconnect-ws-e2e
    
  • You can preview this build entering:
    https://playground.decentraland.org/?sdk-branch=feat/reconnect-ws

@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Patch coverage: 82.92% and project coverage change: +0.23 🎉

Comparison is base (f9d6de9) 74.07% compared to head (1ad3829) 74.30%.

❗ Current head 1ad3829 differs from pull request most recent head 2ed8df9. Consider uploading reports for the commit 2ed8df9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #644      +/-   ##
==========================================
+ Coverage   74.07%   74.30%   +0.23%     
==========================================
  Files         276      285       +9     
  Lines        9293     9447     +154     
  Branches     1260     1265       +5     
==========================================
+ Hits         6884     7020     +136     
- Misses       2292     2309      +17     
- Partials      117      118       +1     
Impacted Files Coverage Δ
...ector/src/components/ProjectAssetExplorer/index.ts 0.00% <0.00%> (ø)
...nings/RotationGizmoLocalAlignmentDisabled/index.ts 0.00% <ø> (ø)
.../src/components/Warnings/SocketConnection/index.ts 0.00% <0.00%> (ø)
...inspector/src/components/Warnings/Warning/index.ts 0.00% <ø> (ø)
...es/@dcl/inspector/src/components/Warnings/index.ts 0.00% <ø> (ø)
packages/@dcl/inspector/src/lib/sdk/context.ts 46.66% <14.28%> (+0.98%) ⬆️
.../@dcl/inspector/src/hooks/catalog/useFileSystem.ts 43.24% <17.64%> (-10.33%) ⬇️
...ages/@dcl/inspector/src/hooks/sdk/useSdkContext.ts 23.52% <21.42%> (+1.02%) ⬆️
...s/@dcl/inspector/src/lib/data-layer/host/stream.ts 92.30% <33.33%> (-1.81%) ⬇️
...ackages/@dcl/inspector/src/hooks/editor/useSave.ts 40.74% <40.00%> (+3.24%) ⬆️
... and 15 more

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gonpombo8 gonpombo8 force-pushed the feat/reconnect-ws branch 3 times, most recently from 5577f45 to 0ce2e19 Compare June 19, 2023 19:08
@gonpombo8 gonpombo8 force-pushed the feat/reconnect-ws branch from 0ce2e19 to ce5a964 Compare June 19, 2023 19:11
@cazala cazala self-requested a review June 19, 2023 21:11
@gonpombo8 gonpombo8 enabled auto-merge (squash) June 20, 2023 20:20
@gonpombo8 gonpombo8 merged commit 39ade45 into main Jun 20, 2023
@gonpombo8 gonpombo8 deleted the feat/reconnect-ws branch June 20, 2023 20:31
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.

2 participants