Repository navigation
Pipeline lifecycle: development and production modes, and the deployment step - #314
Draft
dimitri-yatsenko wants to merge 4 commits into
Draft
dimitri-yatsenko wants to merge 4 commits into
dimitri-yatsenko wants to merge 4 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.
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
Defines development and production as two ways of operating a DataJoint pipeline, derived from first principles, and specifies the lifecycle that connects them. DataJoint is designed to uphold the two modes; enforcement comes from database privileges, not from a DataJoint setting. The recommendations are a standard that individual deployments can vary.
The rule: in development, the definition and the data may change together, from any process. In production, the definition (tables,
make()methods, Lookup contents) changes only in a deployment step, and run time changes only data.What changed
reference/specs/deploy-operations.mdis now "Pipeline Lifecycle and Deployment". New sections come before the existingdatajoint.deployAPI:create_tables, Lookup tables for definition only, changedmake(), preview then delete, additive vs revising changes, checkingmake()before deploying, recording where rows come from;The
datajoint.deployAPI keeps its content, under its own heading. "Deploy hooks" and "staging environment" now read "deployment step" and "development target".Additive and revising changes (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 how each kind is managed: in development both are applied as written; in production additive changes deploy without pausing work, and revising changes are reviewed and deployed with the dependent work paused, together with a data migration.
How the modes differ (new section of the spec):
_prov), turned on by every process that enters data;make()reproducibility contract, with a table of where it is enforced: by DataJoint at run time (populate-only for master tables, the all-or-nothing write, reads throughself.upstream, the tripartitemake_fetchre-check), at review and in the deployment step (the only place every rule is checked), and in production by privileges and workers: only worker logins insert computed rows;reference/specs/autopopulate.md: its statements that the contract isn't enforced at run time now name the parts that are, and link to that table.explanation/development-and-production.md(new) gives the reasoning: why definition and data are kept apart, and how DataJoint upholds the modes.how-to/deploy-production.mdsayscreate_tables=Falseis part of production, not the whole of it, and links to the spec. "Enable Production Mode" becomes "Turn Off Automatic Table Creation". It also corrects when tables are declared: when the class is decorated, usually at import.Inbound link text and nav updated: the CDC explanation, the how-to index, manage-pipeline-project and semantic-matching.
The statements about library behavior were checked against
datajoint-pythonmasterandnext:~lineageare declared;contentsare inserted;safemodeandprompt;AccessError, and the paths where a refusal stays silent.Follow-ups (not in this PR)
how-to/manage-pipeline-project.md: thedev_schema "promotion" diagram and the role table, which has no deployment login, should follow the lifecycle here.how-to/delete-data.md: a production note, preview first, linking recommendation 6.how-to/alter-tables.md: link the additive vs revising classification and the deployment step.datajoint.deploy.add_prov_column(since 2.3.6) is not yet documented in the spec.Draft for discussion of the framing before the follow-ups.