aerie icon indicating copy to clipboard operation
aerie copied to clipboard

Aerie UI and Gateway use different plan schemas

Open cartermak opened this issue 6 months ago • 0 comments

Checked for duplicates

No - I haven't checked

Is this a regression?

No - This is a new bug

Version

develop

Describe the bug

The Aerie-UI interface for uploading/downloading JSON plans uses a schema which matches aerie-cli (as was intended, I think). However, the Aerie Gateway accepts a slightly different plan schema: instead of the plan specifying an start and end time, the Gateway expects (as it's stored in the database) a start time and plan duration.

The conversion between these is done in aerie-ui for reasons I don't fully understand (and maybe I was made aware in the past, but I'm realizing now that I disagree): https://github.com/NASA-AMMOS/aerie-ui/blob/e6a47a8d74080d0c0e0abed3b23008346b9e059a/src/utilities/effects.ts#L5177

I suggest the Gateway is updated to handle this translation instead of doing it in the UI. The Gateway (and UI) can leverage the new aerie-time-utils package to avoid maintaining multiple definitions of the time parsing functions. Otherwise, we start accumulating plans that are written to two different schema depending on where they're being uploaded.

Reproduction

Download a plan from the UI and try to upload it to the Gateway directly. Alternatively, take a plan destined for the Gateway and try to upload with aerie-cli or the UI.

Logs


System Info

local

Severity

Minor

cartermak avatar Jun 17 '25 18:06 cartermak