databrickslabs / databrickslabs/ontos
[Feature]: Data Product Publication Scope (end-to-end)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 212
- Forks
- 71
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 43
Description
Parent PRD
#86
What to build
A thin vertical slice delivering scoped publication for Data Products end-to-end: schema, API, UI, marketplace fix, and data migration.
Replace the published Boolean column on data_products with publication_scope (string, default "none"), published_at (datetime), and published_by (string). Drop the old published column (clean break). Create a PublicationScope enum (none, domain, organization, external) and PublicationInfo Pydantic model in models/lifecycle.py. Implement POST /api/data-products/{id}/publish (with scope in body) and DELETE /api/data-products/{id}/publish endpoints. Enforce prerequisite: entity must be in active status to publish. Add auto-unpublish side effect to the deprecation transition (sets scope to "none"). Fix the existing get_published_products endpoint to filter by publication_scope != "none" instead of just status == "active". Migrate existing published=True rows to publication_scope="organization". Build a PublicationBadge component (lock/users/globe icons by scope). Add publish section to product detail page and inline pub icon in product list.
Refer to the parent PRD "Dimension 3: Publication" section for full design.
Acceptance criteria
- Alembic migration replaces
publishedboolean withpublication_scope,published_at,published_byondata_products; drops oldpublishedcolumn - Existing
published=Truerows migrated topublication_scope="organization"withpublished_at/published_byset fromupdated_at/updated_by -
PublicationScopeenum andPublicationInfoPydantic model created -
POST /api/data-products/{id}/publishwith{scope}body works; rejects if status != "active" -
DELETE /api/data-products/{id}/publishsets scope to "none" - Deprecating a product auto-sets
publication_scopeto "none" -
GET /api/data-products/publishedfilters bypublication_scope != "none"ANDstatus == "active" -
PublicationBadgecomponent renders correct icon per scope value - Product detail page shows publication section with scope badge, published_by, published_at, publish/unpublish button
- Product list table shows inline publication scope icon
- Demo data files updated (no more
published: true) - Unit tests for publish/unpublish logic, status prerequisite, auto-unpublish on deprecation
- Component tests for PublicationBadge
Blocked by
- Blocked by #88 (renamed
activate_productmethod, clean status enum)
User stories addressed
From PRD #86:
- User story 5: Publishing separate from activating
- User story 6: Publish with domain scope
- User story 12: Auto-unpublish on deprecation
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
Read parent PRD #86 and confirm prerequisite issue #88 is complete before starting. Begin with models/lifecycle.py, the data product publication endpoints, deprecation transition, migration, and product detail/list UI entry points. Done means all listed acceptance criteria pass, including migration, API and status behavior, UI badges, demo data, and unit/component tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, database, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100