NASA-AMMOS / aerie

A software framework for modeling spacecraft.
https://nasa-ammos.github.io/aerie-docs/
MIT License
73 stars 19 forks source link

Serialize `NoSuchMissionModel` exception out in activity validations #1354

Closed skovati closed 9 months ago

skovati commented 9 months ago

Description

Adds a try catch (NoSuchMissionModelException deeper within the validation worker loop, so we can catch these exceptions within each model batch iteration, generate a NoSuchMissionModelError for each validation requested for that model batch, and write them out to the database.

This avoids the issue of the worker loop only catching this exception at its outer iteration layer, which would simply print an error and then restart the main validation loop without resolving the pending validation, so it would run into the same issue over and over.

Verification

Added a new test AutomaticValidationTests::noSuchMissionModel. Running this test without the second commit of this PR will fail and output

Expected :NoSuchMissionModelFailure[message=no such mission model, modelId=0]
Actual   :Pending[]

After applying the second commit, the test will pass.

Documentation

None

Future work

None