-
Notifications
You must be signed in to change notification settings - Fork 21
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
Procedural Constraints Database Support #1596
base: develop
Are you sure you want to change the base?
Conversation
Active works in progress:
|
@@ -10,7 +12,7 @@ create table merlin.constraint_run ( | |||
requested_at timestamptz not null default now(), | |||
|
|||
constraint constraint_run_key | |||
primary key (constraint_id, constraint_revision, simulation_dataset_id), | |||
primary key (constraint_invocation_id, simulation_dataset_id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking: This pkey is not sufficient. If the user decides to check constraints twice, updating the definition of a constraint between checks, they will get a pkey conflict when the action attempts to cache the output of the second definition.
(This comment is here to prevent me from not fixing this)
closes #1572
Description
Mirroring the database changes that were made for procedural scheduling support, this PR makes the following changes to the
constraints
sub-schema inmerlin
:invocation_id
was added toconstraint_specification
and made the new (sole) primary key. This allows for multiple "invocations" of that same constraint definition in the same spec.type
enum,uploaded_jar_id
, andparameter
schema fields were added toconstraint_definition
to support procedural constraintsdefinition
was made nullable inconstraint_definition
, since it will be null when that constraint's source code is contained in the uploaded jar.constraint_run
now holds an additional field,constraint_invocation_id
, which replaced(constraint_id, constraint_revision)
in the primary key definition. This is so we can have a constraint run for each invocation in a plan spec, which might share constraint definitions and revisions.constraint_run
also holds the "as run" arguments that were passed to the constraint during execution in a new json fieldarguments
.Verification
WIP
Documentation
Future work