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

feat: handle coreOwnership records in IndexWriter [1/3] #214

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

gmaclennan
Copy link
Member

@gmaclennan gmaclennan commented Aug 23, 2023

Fixes #210, see issue for description

  • Function for validating core ownership and removing signatures
    • Also sets links to [] which makes every document a fork, causing the indexer to call getWinner() to determine which document to index.
  • getWinner() function for always choosing the first core ownership record
  • Add method to IndexWriter for mapping documents during index
  • Add option to IndexWriter for custom "getWinner" when documents are forked

@gmaclennan gmaclennan linked an issue Aug 23, 2023 that may be closed by this pull request
@gmaclennan gmaclennan self-assigned this Aug 23, 2023
@gmaclennan gmaclennan force-pushed the feat/core-ownership-index-writer branch 2 times, most recently from b120309 to 97b51e4 Compare August 28, 2023 14:05
@gmaclennan gmaclennan marked this pull request as ready for review August 28, 2023 14:09
@gmaclennan gmaclennan changed the title feat: Add special handling of coreOwnership records to IndexWriter feat: handle coreOwnership records in IndexWriter [1/3] Aug 28, 2023
@gmaclennan gmaclennan linked an issue Aug 28, 2023 that may be closed by this pull request
7 tasks
Copy link
Member

@achou11 achou11 left a comment

Choose a reason for hiding this comment

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

Overall looks good. Just waiting for the type issue to be addressed

src/core-ownership.js Outdated Show resolved Hide resolved
src/index-writer/index.js Show resolved Hide resolved
src/index-writer/index.js Outdated Show resolved Hide resolved
src/core-ownership.js Outdated Show resolved Hide resolved
@gmaclennan gmaclennan force-pushed the feat/core-ownership-index-writer branch from 97b51e4 to c4688cf Compare August 30, 2023 13:57
custom getWinner and initial mapDoc

Add verifyCoreOwnership function

Add mapAndValidateCoreOwnership

move some code around

add mapDoc and getWinner options to indexWriter

Add tests & small fix

Fix types and use defaultGetWinner from @mapeo/sqlite-indexer

WIP add coreOwnership

custom getWinner and initial mapDoc

Add verifyCoreOwnership function

Add mapAndValidateCoreOwnership

move some code around

add mapDoc and getWinner options to indexWriter

Add tests & small fix

Fix types and use defaultGetWinner from @mapeo/sqlite-indexer
@gmaclennan gmaclennan force-pushed the feat/core-ownership-index-writer branch from c4688cf to d815ca4 Compare August 30, 2023 14:13
@gmaclennan gmaclennan merged commit dbc52c3 into main Aug 30, 2023
6 checks passed
@gmaclennan gmaclennan deleted the feat/core-ownership-index-writer branch August 30, 2023 14:17
gmaclennan added a commit that referenced this pull request Sep 6, 2023
* main: (25 commits)
  add initial implementation of MemberApi (#232)
  feat: $blobs.getUrl and $blobs.create methods (#184)
  chore: update manager e2e tests (#237)
  feat: add capabilities (#231)
  feat: coreOwnership integration [3/3] (#230)
  feat: CoreOwnership class w getOwner & getCoreKey [2/3] (#229)
  feat: handle `coreOwnership` records in `IndexWriter` [1/3] (#214)
  fix: adjust storage options for MapeoManager and MapeoProject (#235)
  implement addProject method for MapeoManager class (#215)
  implement listProjects method for MapeoManager class (#208)
  feat: expose blobStore.writerDriveId (#219)
  implement wrapper client containing createProject and getProject methods (#199)
  add project settings functionality to MapeoProject (#187)
  feat: Add encode/decode for project keys [3/3] (#203)
  feat: update protobuf for RPC [2/3] (#202)
  chore: move protobuf messages into src/generated [1/3] (#201)
  feat: Add internal `dataType.createWithDocId()` (#192)
  chore: explicitly set "mode" opt for encryptionKeys column creation (#186)
  chore: fix linting and type checking (#183)
  chore: consolidate encryption key columns in projectKeys table (#181)
  ...
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.

Add special handling of coreOwnership records to IndexWriter Add core ownership records
2 participants