databrickslabs / databrickslabs/ontos
[Feature]: Estate: Remote Entity Metadata table and repository
Nobody has claimed this yet.
- 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:
RemoteEntityMetadataDbwith 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
-
RemoteEntityMetadataDbmodel 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.pycovering CRUD, stale transitions, queries
Blocked by
None - can start immediately
User stories addressed
- User story 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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