-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Snapshot
entity in models
#1240
Introduce Snapshot
entity in models
#1240
Conversation
Snapshot
entity in models
Let me first reply to the open questions from the PR description:
Quite a nice idea! And agree with the caution of not doing it now. Could you open an issue for this (good idea to keep track of this technical debt). |
Co-authored-by: Yannick Perrenet <26223174+yannickperrenet@users.noreply.github.com>
…eline-of-a-job-draft Dynamically update the pipeline of a job draft
Indeed |
Description
This PR introduces
Snapshot
s as anorchest-api
models entity. I've tried to minimize the exposure/knowledge of the client and theorchest-webserver
to this new entity given that the intent was to support another feature (switching between pipelines for aDRAFT
job) without closing doors for the future.As it is, a
job
depends on a snapshot through a foreign key columnjob.snapshoot_uuid
, existing jobs are migrated in this migration 44699af. The reason is that inverting the dependency felt like a stronger decision and that currently, a snapshot is created before the job is, making the job effectively depend on the snapshot.Checklist
models.py
I have performed the appropriate database migrations (refer to the DB migration docs).Open questions:
project_uuid
andpipeline_uuid
. Do we want to change this? Likely not needed until/if we expand the scope of snapshotspipeline_definition
and the pipelinepath
we could, theoretically, slim down the job model, e.g. by dropping the pipeline definition, the run spec, etc. I'm not sure it's worth doing that while tests are still disabled since an error here could disrupt existing jobs