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

Updated dwn-sdk-js and dwn-sql-store dependencies + v0.1.8 #95

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

thehenrytsai
Copy link
Collaborator

No description provided.

Copy link

codesandbox bot commented Dec 5, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (02780d9) 80.90% compared to head (05906af) 80.58%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
- Coverage   80.90%   80.58%   -0.32%     
==========================================
  Files          15       15              
  Lines        1000      984      -16     
  Branches      100       97       -3     
==========================================
- Hits          809      793      -16     
  Misses        191      191              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thehenrytsai thehenrytsai changed the title Updated dependencies + v0.1.8 Updated dwn-sdk-js and dwn-sql-store dependencies + v0.1.8 Dec 5, 2023
Comment on lines -26 to -45
let reply;
const messageType =
message?.descriptor?.interface + message?.descriptor?.method;

// When a record is deleted via `RecordsDelete`, the initial RecordsWrite is kept as a tombstone _in addition_
// to the RecordsDelete message. the data associated to that initial RecordsWrite is deleted. If a record was written
// _and_ deleted before it ever got to dwn-server, we end up in a situation where we still need to process the tombstone
// so that we can process the RecordsDelete.
if (
messageType === DwnInterfaceName.Records + DwnMethodName.Write &&
!dataStream
) {
reply = await dwn.synchronizePrunedInitialRecordsWrite(target, message);
} else {
reply = (await dwn.processMessage(
target,
message,
dataStream as IsomorphicReadable,
)) as RecordsReadReply;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@thehenrytsai Did you confirm that this works with the Sync implementation in @web5/agent ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, I have not. I believe @LiranCohen is testing (or has tested) sync after the change of deleting the synchronizePrunedInitialRecordsWrite() and DB changes, and is making changes accordingly.

@LiranCohen, let me know if you want me to help with this effort. Don't mind if this PR needs to be on-hold, was just hoping to help speeding up the process.

Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

Tested against web5-js for breaking changes.

Relevant changes for SyncManager.
decentralized-identity/web5-js#342

@LiranCohen LiranCohen merged commit a55711f into main Dec 13, 2023
8 checks passed
thehenrytsai added a commit that referenced this pull request Jan 3, 2024
* main:
  Disambiguated the data folder of test-dwn.ts
  Updated `dwn-sdk-js` and `dwn-sql-store` dependencies + v0.1.8 (#95)
  feat: introduce npx
  bump dwn version and release new server version (#93)
  bump dwn sdk to v0.2.7 (#92)
  add Henry to CODEOWNERS
  fix CODEOWNERS formatting, add Liran as code owner
@LiranCohen LiranCohen deleted the henrytsaik/dwn-sdk-js-v0.2.9 branch September 5, 2024 23:55
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.

5 participants