AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

feat: affine-cloud sync server & SocketIO provider

Open thorseraq opened this issue 2 years ago • 6 comments

  • [x] sync server based on Socket.IO
  • [x] corresponding sync provider
  • [x] supportng subdoc
  • [x] storage, collaboration test
  • [x] start affine server to pass test in CI (ignored, expected to test as e2e)
  • [ ] auth

thorseraq avatar Jun 27 '23 15:06 thorseraq

This branch is running in CodeSandbox. Use the links below to review this PR faster.
CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders | Preview

codesandbox[bot] avatar Jun 27 '23 15:06 codesandbox[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
affine-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2023 5:47am
affine-preview 🛑 Canceled (Inspect) Jul 5, 2023 5:47am
affine-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2023 5:47am

vercel[bot] avatar Jun 27 '23 15:06 vercel[bot]

affine-toeverything

Bundle main

diff ------------------- Bundle Size Diff -------------------------

@@                       EntryPoint: main                        @@
##                     master …t/sync-server                 +/- ##
===================================================================
< Bundle              5.24 MB        5.33 MB    +87.5 kB(+1.67%)   
< Initial JS          2.22 MB        2.27 MB    +47.3 kB(+2.13%)   
= Initial CSS           71 kB          71 kB                       
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
< Assets                   72             76                  +4   
< Chunks                   57             60                  +3   
< Packages                207            213                  +6   
= Duplicates               19             19                       
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warnings ~~~~~~~~~~~~~~~~~~~~~~~~~~~#
! Deduplicate versions of libraries                                
! Separate mixed content assets files                              
! Avoid cache wasting                                              

@@                    EntryPoint: pages/_app                     @@
##                     master …t/sync-server                 +/- ##
===================================================================
< Bundle              5.13 MB        5.22 MB    +87.4 kB(+1.70%)   
< Initial JS          2.11 MB        2.16 MB    +47.2 kB(+2.23%)   
= Initial CSS           71 kB          71 kB                       
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
< Assets                   70             74                  +4   
< Chunks                   55             58                  +3   
< Packages                207            213                  +6   
= Duplicates               19             19                       
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warnings ~~~~~~~~~~~~~~~~~~~~~~~~~~~#
! Deduplicate versions of libraries                                
! Separate mixed content assets files                              
! Avoid cache wasting                                              

@@                   EntryPoint: pages/_error                    @@
##                     master …t/sync-server                 +/- ##
===================================================================
= Bundle              16.6 kB        16.6 kB                       
= Initial JS          16.6 kB        16.6 kB                       
= Initial CSS             0 B            0 B                       
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
= Assets                    2              2                       
= Chunks                    2              2                       
= Packages                  5              5                       
= Duplicates                0              0                       

...and more

perfsee[bot] avatar Jun 27 '23 17:06 perfsee[bot]

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: ae9cba0
Status: ✅  Deploy successful!
Preview URL: https://ce1f39aa.affine-dev.pages.dev
Branch Preview URL: https://feat-sync-server.affine-dev.pages.dev

View logs

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b86c6e39a0c7515c1d832d3d8b98b442ea95d953. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Jun 29 '23 03:06 nx-cloud[bot]

Codecov Report

Patch coverage: 36.63% and project coverage change: -5.16 :warning:

Comparison is base (4a4bdcc) 66.76% compared to head (b86c6e3) 61.61%.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           himself65/0629-login    #2881      +/-   ##
========================================================
- Coverage                 66.76%   61.61%   -5.16%     
========================================================
  Files                       150      354     +204     
  Lines                      4538     8772    +4234     
  Branches                    570     1094     +524     
========================================================
+ Hits                       3030     5405    +2375     
- Misses                     1351     3066    +1715     
- Partials                    157      301     +144     
Flag Coverage Δ
e2etest 52.26% <30.13%> (?)
server-test 75.82% <56.90%> (-1.90%) :arrow_down:
unittest 53.10% <1.02%> (-4.04%) :arrow_down:

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

Impacted Files Coverage Δ
apps/server/src/app.ts 100.00% <ø> (ø)
apps/web/next.config.mjs 39.21% <ø> (ø)
apps/web/preset.config.mjs 36.36% <ø> (ø)
packages/env/src/workspace.ts 100.00% <ø> (ø)
...kages/workspace/src/affine/sync-socket-io/utils.ts 0.00% <0.00%> (ø)
...kages/workspace/src/affine/sync-socket-io/index.ts 12.28% <12.28%> (ø)
packages/workspace/src/providers/index.ts 72.54% <12.50%> (+0.45%) :arrow_up:
apps/server/src/modules/sync/utils.ts 25.00% <25.00%> (ø)
apps/server/src/modules/sync/events/workspace.ts 28.07% <28.07%> (ø)
...s/server/src/modules/sync/events/events.gateway.ts 49.36% <49.36%> (ø)
... and 7 more

... and 264 files with indirect coverage changes

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

codecov[bot] avatar Jun 29 '23 03:06 codecov[bot]