NASA-IMPACT / admg-backend

Apache License 2.0
2 stars 0 forks source link

Server Error when trying to update a deployment in TOST Campaign #617

Closed bcr1578 closed 3 months ago

bcr1578 commented 5 months ago

Describe the bug When doing curation for the TOST campaign, I ran into an issue. I had been trying to adjust the spatial bounds of the campaign's first deployment (TOST_dep_2003_spring) and eventually was unable to save again, instead being directed to a server error 500 page. This first happened on Wednesday morning (3/20) and has persisted when I try to click to edit the deployment again. I had saved a few times before in order to adjust the boundary box correctly, so maybe that messed something up. Deleted cookies and restarted browser but did not solve issue for me.

To Reproduce Steps to reproduce the behavior:

  1. Go to TOST campaign and click "Details" tab
  2. Click "edit" for the TOST_dep_2003_spring campaign
  3. Get Server Error 500 page

Expected behavior I expected the MI to save my progress without error and update the boundary box for the deployment accordingly.

Screenshots TOST bug screencap 1 TOST bug screencap 2

Desktop (please complete the following information):

Additional context I'm not sure if this is just a problem on my end or if this issue will affect the reviewers of the campaign, too.

bcr1578 commented 5 months ago

@heidimok Hey Heidi, I submitted this but it's nothing urgent. Just leaving a note here to make you aware. Please let me know if this is something I can fix easily on my end and I'm overlooking something. Thank you!

heidimok commented 5 months ago

Thanks for submitting it @bcr1578. I'll check it out and see if we can bring it into our next sprint depending on the capacity of developers.

Tammo-Feldmann commented 4 months ago

@heidimok I had a look at this bug and I can see it happening in the production deployment. I traced it back to a GDAL error that is trying to parse a specific set of spatial bounds "41.07, -117.78, 5.85, -167.45" . I don't know why it doesn't like those bounds but they crash GDAL in the widget that renders the bounds. From what I can see, this is likely not our application code. What I think we could do, is to understand what the constraints are and guard more closely against spatial bounds inputs that can't be parsed. Just wanted to leave a quick update here.

heidimok commented 4 months ago

Thank you for digging into the problem @Tammo-Feldmann

Can we do something like this?

  1. Help curators understand what the constraints are

    image

    Add helper text to define specifications required for spatial bounds

  2. Guard more closely against spatial bound inputs that can't be parsed

    image

    When validating or saving, we show red error message under the component, similar to what is currently in place in other areas like

    image
heidimok commented 3 months ago

The conclusion here is:

I will close and create a new issue in the backlog specific to adding helper text on spatial bounds and do a validation to check that the first Longitude is smaller than the second, and the same for the Latitude so that it's more clear for the future.