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

MVP Procedural Scheduling UI #1418

Merged
merged 26 commits into from
Sep 9, 2024
Merged

Conversation

skovati
Copy link
Contributor

@skovati skovati commented Aug 6, 2024

___REQUIRES_AERIE_PR___="1496"

NASA-AMMOS/aerie#1496

Adds a few small UI features in the scheduling goals panel that add additional functionality (arguments, duplicating goal invocations) when dealing with procedures instead of EDSL goals.

As part of the procedural scheduling backend changes, the primary key for scheduling_specification_goals is a new (auto-generated) goal_invocation_id int. This PR also updates a few functions / GQL queries to use this ID instead of (spec, goal_id, revision) when possible

@skovati skovati force-pushed the feature/procedural-scheduling branch from 39265c0 to 1d21749 Compare August 15, 2024 17:54
@skovati skovati marked this pull request as ready for review August 15, 2024 17:54
@skovati skovati requested a review from a team as a code owner August 15, 2024 17:54
Copy link
Collaborator

@duranb duranb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few typing and linting changes that are necessary. @skovati let me know if VSCode isn't exposing those to you somehow.

src/components/scheduling/SchedulingGoalsPanel.svelte Outdated Show resolved Hide resolved
src/components/scheduling/goals/SchedulingGoal.svelte Outdated Show resolved Hide resolved
src/components/scheduling/goals/SchedulingGoal.svelte Outdated Show resolved Hide resolved
src/types/metadata.ts Outdated Show resolved Hide resolved
src/utilities/gql.ts Outdated Show resolved Hide resolved
@skovati skovati force-pushed the feature/procedural-scheduling branch from 1f3f5ab to ab015f5 Compare August 26, 2024 20:28
@skovati skovati force-pushed the feature/procedural-scheduling branch from 395977c to 65167bc Compare August 28, 2024 21:38
@skovati skovati requested a review from duranb August 28, 2024 22:11
two part fix:
 - `allowedSchedulingGoalSpecs` was really an array, but was treated as an object
   - use `find` instead of indexing with `goal_id`
 - remove owner check, since that was always being triggered as true,
   causing an update
   - this extranous update was fine before, since the upsert would
     handle the deduplication, but now with goal invocations, where we
     allow duplicates, it was causing random duplications of goals when
     exiting the modal
@skovati skovati force-pushed the feature/procedural-scheduling branch from 74cd3fa to b93ad1d Compare September 4, 2024 23:09
Copy link
Collaborator

@dandelany dandelany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I've been testing this with the feature/scheduling-upload branch and looks ready for first release, thanks

@dandelany dandelany merged commit 7f568f7 into develop Sep 9, 2024
5 checks passed
@dandelany dandelany deleted the feature/procedural-scheduling branch September 9, 2024 23:14
@joswig joswig removed the DON'T MERGE Do Not Merge This Branch label Sep 12, 2024
JosephVolosin pushed a commit that referenced this pull request Oct 21, 2024
* Prototype for showing parameters for scheduling procedures

* Add support for scheduling goal invocations

* fix revision bug

* wip goal invocation PK change

* fix scheduling goal page bug for non-procedural goals

* fix linting errors

* move `type` field from `BaseDefinition` to `SchedulingGoalDefinition`

* Clean up SchedulingGoal.svelte with small suggestions

* run prettier

* oh eslint you are so picky

* fix svelte check errors

* run prettier

* follow pattern of filtering allowed goal invocations

* use `Queries.SCHEDULING_SPECIFICATION_GOALS` enum

* run prettier

* fix duplicate invocation bug when exiting the goal management modal

two part fix:
 - `allowedSchedulingGoalSpecs` was really an array, but was treated as an object
   - use `find` instead of indexing with `goal_id`
 - remove owner check, since that was always being triggered as true,
   causing an update
   - this extranous update was fine before, since the upsert would
     handle the deduplication, but now with goal invocations, where we
     allow duplicates, it was causing random duplications of goals when
     exiting the modal

* make eslint and prettier happy

* remove console.log

* remove unnecessary mutable result variable

* remove redundant invocation stores

* add type to plan spec mega query

* add new effect for creating goal invocation

* remove on_conflict from `updateSchedulingGoalPlanSpecifications`

* run prettier

* add new invocation insert type that omits `goal_invocation_id`

* follow insert/set naming convention now that update doesn't use the input type

---------

Co-authored-by: Matthew Dailis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants