Skip to content
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

Feature/channel dictionary hookup #1420

Merged
merged 6 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
table:
name: channel_dictionary
schema: public
insert_permissions:
- role: aerie_admin
permission:
columns: "*"
check: {}
select_permissions:
- role: aerie_admin
permission:
columns: "*"
filter: {}
allow_aggregations: true
- role: user
permission:
columns: "*"
filter: {}
allow_aggregations: true
- role: viewer
permission:
columns: "*"
filter: {}
allow_aggregations: true
delete_permissions:
- role: aerie_admin
permission:
filter: {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ table:
name: parcel
schema: public
object_relationships:
- name: channel_dictionary
using:
foreign_key_constraint_on: channel_dictionary_id
- name: command_dictionary
using:
foreign_key_constraint_on: command_dictionary_id
- name: parameter_dictionary
using:
foreign_key_constraint_on: parameter_dictionary_id
- name: sequence_adaptation
using:
foreign_key_constraint_on: sequence_adaptation_id
Expand Down Expand Up @@ -47,5 +47,5 @@ delete_permissions:
update_permissions:
- role: aerie_admin
permission:
columns: [command_dictionary_id, name, parameter_dictionary_id, sequence_adaptation_id]
columns: [channel_dictionary_id, command_dictionary_id, name, sequence_adaptation_id]
filter: {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- "!include public_activity_instance_commands.yaml"
- "!include public_channel_dictionary.yaml"
- "!include public_command_dictionary.yaml"
- "!include public_expansion_rule.yaml"
- "!include public_expansion_run.yaml"
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
POSTGRES_PASSWORD: "${AERIE_PASSWORD}"
POSTGRES_PORT: 5432
POSTGRES_USER: "${AERIE_USERNAME}"
image: "ghcr.io/nasa-ammos/aerie-gateway:develop"
image: "ghcr.io/nasa-ammos/aerie-gateway:v2.6.2"
ports: ["9000:9000"]
restart: always
volumes:
Expand Down Expand Up @@ -94,7 +94,7 @@ services:
SEQUENCING_LOCAL_STORE: /usr/src/app/sequencing_file_store
SEQUENCING_WORKER_NUM: 8
SEQUENCING_MAX_WORKER_HEAP_MB: 1000
TRANSPILER_ENABLED : "true"
TRANSPILER_ENABLED: "true"
image: aerie_sequencing
ports: ["27184:27184"]
restart: always
Expand Down
12 changes: 6 additions & 6 deletions sequencing-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sequencing-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@js-temporal/polyfill": "~0.4.3",
"@nasa-jpl/aerie-ampcs": "~1.0.4",
"@nasa-jpl/aerie-ampcs": "~1.0.5",
"@nasa-jpl/aerie-ts-user-code-runner": "~0.6.0",
"@nasa-jpl/seq-json-schema": "1.0.19",
"body-parser": "~1.20.1",
Expand Down
1 change: 1 addition & 0 deletions sequencing-server/sql/sequencing/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ begin;
\ir applied_migrations.sql

-- Command Expansion Tables.
\ir tables/channel_dictionary.sql
\ir tables/command_dictionary.sql
\ir tables/parameter_dictionary.sql
\ir tables/sequence_adaptation.sql
Expand Down
27 changes: 27 additions & 0 deletions sequencing-server/sql/sequencing/tables/channel_dictionary.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
create table channel_dictionary (
id integer generated always as identity,

mission text not null,
version text not null,
parsed_json jsonb not null default '{}',

created_at timestamptz not null default now(),

constraint channel_dictionary_synthetic_key
primary key (id),
constraint channel_dictionary_natural_key
unique (mission,version)
);

comment on table channel_dictionary is e''
'A Channel Dictionary for a mission.';
comment on column channel_dictionary.id is e''
'The synthetic identifier for this channel dictionary.';
comment on column channel_dictionary.mission is e''
'A human-meaningful identifier for the mission described by the channel dictionary';
comment on column channel_dictionary.version is e''
'A human-meaningful version qualifier.';
comment on column channel_dictionary.parsed_json is e''
'The XML that has been parsed and converted to JSON';
comment on constraint channel_dictionary_natural_key on channel_dictionary is e''
'There can only be one channel dictionary of a given version for a given mission.';
6 changes: 3 additions & 3 deletions sequencing-server/sql/sequencing/tables/parcel.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ create table parcel (

name text not null,

channel_dictionary_id integer default null,
command_dictionary_id integer not null,
parameter_dictionary_id integer not null,
sequence_adaptation_id integer default null,

created_at timestamptz not null default now(),
Expand All @@ -14,10 +14,10 @@ create table parcel (
constraint parcel_synthetic_key
primary key (id),

foreign key (channel_dictionary_id)
references channel_dictionary (id),
foreign key (command_dictionary_id)
references command_dictionary (id),
foreign key (parameter_dictionary_id)
references parameter_dictionary (id),
foreign key (sequence_adaptation_id)
references sequence_adaptation (id)
);
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
create table parcel_to_parameter_dictionary (
id integer generated always as identity,

parcel_id integer not null,
parameter_dictionary_id integer not null,

constraint parcel_to_parameter_dictionary_synthetic_key
primary key (parcel_id, parameter_dictionary_id),
primary key (id),

foreign key (parcel_id)
references parcel (id)
Expand Down
Loading