databrickslabs / databrickslabs/ontos

[Feature]: Estate: Remote Entity Metadata table and repository

Open
#145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/feature
Dominant language
Python
Stars
212
Forks
71
Avg merge
4d 10h
Merged PRs (30d)
43

Description

Parent PRD

#143

What to build

Create the shared remote_entity_metadata DB table and repository that tracks which local entities are replicas of remote ones. This is the core data structure enabling remote awareness across the entire app.

  • New DB model: RemoteEntityMetadataDb with columns: entity_type, entity_id, source_instance_id, source_entity_id, source_instance_name, source_instance_url, last_synced_at, is_stale, stale_since
  • Repository with CRUD, query by source instance, query by entity type, bulk stale-marking
  • Composite unique constraint on (entity_type, entity_id)

See "Remote Entity Tracking" section of the parent PRD.

Acceptance criteria

  • RemoteEntityMetadataDb model created with all specified columns
  • Repository supports: create, update, get by entity, query by source instance, query by entity type, mark stale, bulk mark stale
  • Composite unique constraint on (entity_type, entity_id)
  • Tests: test_remote_entity_metadata.py covering CRUD, stale transitions, queries

Blocked by

None - can start immediately

User stories addressed

  • User story 17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the “Remote Entity Tracking” section of parent PRD #143, then locate the database model and repository entry points for the new remote_entity_metadata table. Implement the listed CRUD, query, stale-marking, and uniqueness behavior, and use test_remote_entity_metadata.py to cover CRUD, stale transitions, and queries.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.