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

Modify stopSync to block if sync is currently active #889

Merged
merged 4 commits into from
Sep 6, 2024

Conversation

LiranCohen
Copy link
Member

@LiranCohen LiranCohen commented Sep 5, 2024

stopSync now blocks if a current sync is in progress before clearing the interval. An optional timeout can be defined, the default is 2 seconds. After this timeout it will throw.

TestHarness has been updated to stop sync before clearing storage, previously this caused an issue where an ongoing sync would attempt to sign messages for DID that no longer had keys after clearing storage.

#890 has been created to better address this by creating a signal to gracefully stop sync immediately.

Copy link

changeset-bot bot commented Sep 5, 2024

🦋 Changeset detected

Latest commit: 1a31231

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@web5/agent Patch
@web5/identity-agent Patch
@web5/proxy-agent Patch
@web5/user-agent Patch
@web5/api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Sep 5, 2024

TBDocs Report

🛑 Errors: 0
⚠️ Warnings: 5

@web5/api

  • Project entry file: packages/api/src/index.ts

@web5/crypto

  • Project entry file: packages/crypto/src/index.ts
📄 File: ./packages/crypto/src/utils.ts
⚠️ extractor:typedoc:missing-docs: CryptoUtils (Variable) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CryptoUtils.__type.randomPin (Property) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CryptoUtils.__type.randomUuid (Property) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CryptoUtils.__type.randomBytes (Property) does not have any documentation.
⚠️ extractor:typedoc:missing-docs: CryptoUtils.__type.getJoseSignatureAlgorithmFromPublicKey (Property) does not have any documentation.

@web5/crypto-aws-kms

  • Project entry file: packages/crypto-aws-kms/src/index.ts

@web5/dids

  • Project entry file: packages/dids/src/index.ts

@web5/credentials

  • Project entry file: packages/credentials/src/index.ts

TBDocs Report Updated at 2024-09-06T18:36:26Z 1a31231

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.43%. Comparing base (da3630a) to head (1a31231).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #889   +/-   ##
=======================================
  Coverage   93.43%   93.43%           
=======================================
  Files         117      117           
  Lines       33279    33297   +18     
  Branches     2668     2673    +5     
=======================================
+ Hits        31093    31112   +19     
+ Misses       2147     2146    -1     
  Partials       39       39           
Components Coverage Δ
agent 87.43% <100.00%> (+0.03%) ⬆️
api 99.60% <ø> (-0.03%) ⬇️
common 98.68% <ø> (ø)
credentials 94.95% <ø> (ø)
crypto 93.79% <ø> (ø)
dids 97.77% <ø> (ø)
identity-agent 96.42% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 96.42% <ø> (ø)
user-agent 96.57% <ø> (ø)

csuwildcat
csuwildcat previously approved these changes Sep 5, 2024
@LiranCohen LiranCohen changed the title Add missing changeset startSync bug Modify stopSync to block if sync is currently active Sep 5, 2024
If the timeout is elapsed before an ongoing sync completes, stopSync will throw.

Updated test cases.
@LiranCohen LiranCohen merged commit e578e20 into main Sep 6, 2024
35 checks passed
@LiranCohen LiranCohen deleted the lirancohen/changeset-for-sync branch September 6, 2024 21:38
@github-actions github-actions bot mentioned this pull request Sep 6, 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.

3 participants