Skip to content

Conversation

@ChrisPenner
Copy link
Member

@ChrisPenner ChrisPenner commented Feb 4, 2025

Overview

Deployment

  • Run SQL migrations/add new functions.

Adds a simple causal-dependencies API for UCM to determine before a pull which hashes it actually needs.

The causal-dependencies endpoint returns a stream of causals to UCM , each tagged with whether it's part of the top-level history of the root, or whether it's a lib root.

UCM can then pick out which of these dependencies it does have, then send those to the server with the pull.v2 request; where Share will cull entire subtrees based on the dependencies it knows UCM has already.

This allows us to use pull.v2 in cases where it's likely to be a small update.

Test coverage

I've tested this locally, I'll throw it up on staging and run it through its paces.

Luckily its' back-compatible with the previous syncv2 version, which simply doesn't do the pre-negotiation.

Loose ends

We may wish to recurse causal-negotiation on lib deps which have missing deps as well. Should be easy enough to include hash-jwts for those;

Or we can do this on the server and include those deps in the initial stream.

@ChrisPenner ChrisPenner merged commit 7698516 into main Feb 5, 2025
4 checks passed
@ChrisPenner ChrisPenner deleted the syncv2/causal-negotiation branch February 5, 2025 17:50
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