-
Notifications
You must be signed in to change notification settings - Fork 52
Improve monitorable server job exception handling #331
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
Improve monitorable server job exception handling #331
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #331 +/- ##
============================================
- Coverage 24.10% 24.04% -0.06%
- Complexity 539 542 +3
============================================
Files 168 169 +1
Lines 8821 8895 +74
Branches 1222 1230 +8
============================================
+ Hits 2126 2139 +13
- Misses 6486 6543 +57
- Partials 209 213 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Fix tmp gtfs creation
| return null; | ||
| } | ||
| // download otp-runner manifest | ||
| lines.add(String.format("aws s3 cp %s %s", otpRunnerManifestS3FilePath, otpRunnerManifestFileOnInstance)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yea. This seems much better than echoing the manifest from the user-data. Also, makes things more repeatable. For some reason, in my head I thought we were already uploading the otp-runner file to s3. In any case, nice work.
…job-exception-handling
…job-exception-handling
…job-exception-handling
…stance fails to terminate
|
Ready for review now that #330 has been merged into dev. |
src/main/java/com/conveyal/datatools/manager/jobs/MonitorServerStatusJob.java
Outdated
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/MonitorServerStatusJob.java
Outdated
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/MonitorServerStatusJob.java
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/MonitorServerStatusJob.java
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/MonitorServerStatusJob.java
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/MonitorServerStatusJob.java
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Outdated
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Outdated
Show resolved
Hide resolved
| "%s During job cleanup, the graph building instance was not properly terminated!", | ||
| status.message | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than surrounding each call to terminateInstances in a try/catch, we should just have the terminateInstances method itself contain the try/catch, check the TerminateInstancesResult and return a success boolean. I don't think the current return type is really used anywhere.
src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Outdated
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Outdated
Show resolved
Hide resolved
landonreed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments describing some changes I think would help.
binh-dam-ibigroup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditional approval on what Landon said and some minor comments.
src/main/java/com/conveyal/datatools/manager/jobs/MonitorServerStatusJob.java
Outdated
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Outdated
Show resolved
Hide resolved
| ); | ||
| } catch (AmazonEC2Exception e) { | ||
| status.fail( | ||
| String.format("%s. During job cleanup, the instance was not properly terminated!", status.message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This string appears four times in this file and can become a constant.
|
See various changes that should address the comments. |
|
🎉 This PR is included in version 3.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Checklist
devbefore they can be merged tomaster)Description
This improves the reliability of the MonitorServerStatusJob by doing the following: