Mirroring the database changes that were made for procedural scheduling support, this PR makes the following changes to the constraints sub-schema in merlin:
an auto-generated ID invocation_id was added to constraint_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, and parameter schema fields were added to constraint_definition to support procedural constraints
definition was made nullable in constraint_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 field arguments.
merlin server was updated to comply with these schema changes
closes https://github.com/NASA-AMMOS/aerie/issues/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