When an error is generated within the run method of the agent, it was throwing out to the caller, and handling the error with logging.exception. this meant the shipping of logs to S3 which happens within self._finalise_log was not getting called. As a result, certain error types weren't being made available to users within the UI of Environment Manager - resulting in a 500 error.
The loop around all deployment stages is now wrapped in a try/except statement. If there is a thrown error now, it will still behave the same way when it comes to using logging.exception (as that was handled in the caller previously) but it will also finalise the log and ship what it has to S3.
When an error is generated within the run method of the agent, it was throwing out to the caller, and handling the error with
logging.exception
. this meant the shipping of logs to S3 which happens withinself._finalise_log
was not getting called. As a result, certain error types weren't being made available to users within the UI of Environment Manager - resulting in a 500 error.The loop around all deployment stages is now wrapped in a try/except statement. If there is a thrown error now, it will still behave the same way when it comes to using
logging.exception
(as that was handled in the caller previously) but it will also finalise the log and ship what it has to S3.