Skip to content

user and replica set entity manager - #3897

Merged
jowlee merged 40 commits into
masterfrom
jowlee-user-entity-manager
Sep 28, 2022
Merged

jowlee merged 40 commits into
masterfrom
jowlee-user-entity-manager

Conversation

@jowlee

@jowlee jowlee commented Sep 20, 2022

Copy link
Copy Markdown
Contributor

Description

  • Adds User Entity Manager indexing
  • Adds Update User Replica Set via Entity Manager Indexing
  • Update Content Node to query discovery node instead of contracts for user's replica set
  • Updates libs to request changes to user and replica set via entity manager
  • Updates the Signup Flow as follows
    • Initial request to create a user with the user_id, sp_ids, and signed wallet
    • On confirmation, uploads metadata to content node
    • Then, makes request to update user with metadata cid
  • Adds an endpoint to discovery node to expose the user replica set via the /v1 endpoint
  • Creates an eth_manager in discovery node to organize the code to fetch content node information from chain
  • Updates user indexing methods to only take in required dependencies instead of the whole update_task so that methods can be reused in the entity_manger indexing of users

Tests

Manually tested e2e for entity manger changes:

  • Upload User (2-step) first create with replica set then upload metadata - cn to confirmed replica set on discovery
  • Updated the user's replica set from the client (signed by the user)
  • Updated the user's replica via the content node's async job - triggered via taking down one of the content nodes in the replica locally
  • Confirmed user updating profile works as expected - all fields changed
  • manually force CN to issue reconfig for non-replica user and confirm timely error
  • manually test uploading to non-primary

Discovery Tests

  • Added integration test for entity manager replica set indexing
  • Added integration tests for entity manager user indexing
  • Added unit tests for spid parsing used in entity manager user indexing

Content Node

  • updated tests to utilize the new validation of user replica set via entity manager and appropriate mocks

Monitoring - How will this change be monitored? Are there sufficient logs / alerts?

Additional logs around the user entity manager writes and waiting for confirmation are created in content node
Entity manager logs in discovery for indexing

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants