databrickslabs / databrickslabs/ontos

[Feature]: Data Product Publication Scope (end-to-end)

Open
#90 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

#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 published boolean with publication_scope, published_at, published_by on data_products; drops old published column
  • Existing published=True rows migrated to publication_scope="organization" with published_at/published_by set from updated_at/updated_by
  • PublicationScope enum and PublicationInfo Pydantic model created
  • POST /api/data-products/{id}/publish with {scope} body works; rejects if status != "active"
  • DELETE /api/data-products/{id}/publish sets scope to "none"
  • Deprecating a product auto-sets publication_scope to "none"
  • GET /api/data-products/published filters by publication_scope != "none" AND status == "active"
  • PublicationBadge component 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_product method, 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.