Repository navigation
Pipeline lifecycle: development and production modes, and the deployment step - #314
Open
dimitri-yatsenko wants to merge 10 commits into
Open
dimitri-yatsenko wants to merge 10 commits into
dimitri-yatsenko wants to merge 10 commits into
Conversation
Define development and production as modes of a target, from first principles: the definition (tables, make(), Lookup contents) changes only in a deployment step in production, and run time changes only data. The deploy-operations spec now specifies the lifecycle, the recommendations for production, the deployment step and what DataJoint does at run time, ahead of the datajoint.deploy API. A new explanation page gives the reasoning. The production how-to and inbound links are aligned: create_tables=False is part of production, not the whole.
dimitri-yatsenko
requested review from
MilagrosMarin,
lum-agilyti and
ttngu207
November 19, 2026 23:23
…d Lookup seeding across modes Introduce the two kinds of change to a production pipeline, additive and revising, with examples and how each is managed in each mode. Specify how intrinsic and extrinsic provenance, the make() reproducibility contract and Lookup seeding differ between development and production, and where the make() contract is enforced: by DataJoint at run time (populate-only for master tables, the all-or-nothing write, reads through self.upstream, the tripartite make_fetch re-check), at review and deployment, and optionally by privileges. Align the autopopulate spec's statements on enforcement.
populate() and make() run only in workers, from a clean checkout of the committed code at the deployed version, so the git version recorded with each computed row is the code that computed it. Worker logins alone may insert into auto-populated tables and their parts; user logins read, enter Manual data, and delete (previewed), which cascades through auto-populated tables.
…deployment A change to a production pipeline is designed on a temporary development pipeline declared from the deployed code (in a separate database, on a copy-on-write branch, or in memory). Its product is verified code: the change is reviewed and merged, the release checks each make() against the reproducibility contract, and the deployment step applies the DDL. Workers populate from a fresh checkout of the deployed commit. Data moves only from production to development (new recommendation 11). A development pipeline never becomes production: the production pipeline is declared empty from code, except that a pipeline others already depend on adopts the standard in place. Adds the change-cycle figure, marking where the contract is checked and enforced and where DDL is applied, and redraws the lifecycle figure.
…ole life; no in-place conversion Most pipelines in use today are development pipelines; the production conventions are new and optional. A pipeline that wants production's guarantees gets them in a new production pipeline declared from its code, not by converting an existing target.
…ion, data to development only
dimitri-yatsenko
marked this pull request as ready for review
November 24, 2026 23:01
…duction's entry path Computed and Imported rows never move. A development pipeline, including one that keeps running, can serve production as an outside source of Manual rows, entered through production's entry path with provenance capture on. Recommendation 11 lists what to watch for: test rows, definition mismatch, upstream references, keys, stored objects, and repeated transfers.
Member
Author
|
One change since review was requested: the one-way data rule now has a route for Manual rows.
The explanation page, both figures and the schema promotion section of the how-to are updated to match. |
…pipelines for quick prototyping; how-to diagrams as SVG The deployment step section lists what must happen (compare, classify, pause, declare hidden tables, Lookup contents, data migration, grants, environment, record, start) without specifying how; the step is carried out by whatever deploys the pipeline. The manage-pipeline-project development/production and branching diagrams are now SVG figures.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR defines development and production as two ways of operating a DataJoint pipeline, and specifies the lifecycle that connects them and the cycle a change goes through. DataJoint is designed to support both modes. They are enforced by database privileges, not by a DataJoint setting. The recommendations are a standard that individual deployments can vary.
The rule:
make()methods, Lookup contents) changes only in a deployment step, and run time changes only data.Development is DataJoint's default. Most pipelines in use today are development pipelines, including many that others depend on. The production conventions are new, and nothing requires a pipeline to adopt them. A pipeline may stay in development for its whole life.
Development and production are separate pipelines. A development pipeline never becomes a production pipeline. A production pipeline is declared empty, from code, by its first deployment step. It fills only through production's own paths: entry and import for Manual and Imported tables, and workers for Computed tables. That way every production row is covered by production's provenance controls from the first. An existing pipeline is not converted in place.
The cycle of a change, drawn as a new figure:
make()against the reproducibility contract.make()from a fresh checkout of the deployed commit.What changed
reference/specs/deploy-operations.md, now "Pipeline Lifecycle and Deployment". New sections come before the existingdatajoint.deployAPI:create_tables;make()as a change to the definition;make()at release;The
datajoint.deployAPI keeps its content, under its own heading.Additive and revising changes (a new section of the spec). An additive change extends the pipeline and leaves what exists as it was. A revising change removes, renames, narrows or constrains what running code reads or writes, or changes what existing rows mean. The section gives examples of each and says how each kind is managed.
How the modes differ (a new section of the spec):
_prov);make()reproducibility contract, with a table of where it is enforced: by DataJoint at run time, by review and release, and in production by privileges and workers;reference/specs/autopopulate.md: names the parts of the contract that DataJoint enforces at run time, and says the rest is checked at release.explanation/development-and-production.md(new): the reasoning behind the two modes, the cycle of a change, why data moves one way only, and development as the default.how-to/deploy-production.md:create_tables=Falseis part of production, not the whole of it. "Enable Production Mode" becomes "Turn Off Automatic Table Creation". The page also corrects when tables are declared: when the class is decorated, usually at import.how-to/manage-pipeline-project.md: the "schema promotion" diagram now shows code moving to production and data moving to development only, and links to the lifecycle.Inbound link text and navigation are updated.
The statements about library behavior were checked against
datajoint-pythonmaster. In-memory drafting is datajoint/datajoint-python#1552 (2.4).Open question
Follow-ups (not in this PR)
how-to/delete-data.md: a production note on previewing a delete first, linking recommendation 7.how-to/alter-tables.md: link the additive and revising classification and the deployment step.datajoint.deploy.add_prov_column(since 2.3.6) is not yet documented in the spec.