-
Notifications
You must be signed in to change notification settings - Fork 33
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
Handle Missing jobStartTime in JSON Deserialization #153
Conversation
- Added handling for scenarios where jobStartTime is not present in the JSON input. - Ensures FlintInstance deserialization remains robust and error-free even when jobStartTime is missing. Testing: 1. Extended unit tests to cover the new case. 2. Conducted manual sanity tests to ensure stability and correctness. Signed-off-by: Kaituo Li <[email protected]>
@@ -24,7 +24,7 @@ class FlintInstance( | |||
var state: String, | |||
val lastUpdateTime: Long, | |||
// We need jobStartTime to check if HMAC token is expired or not |
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.
remove this
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.
removed
@@ -75,7 +78,13 @@ object FlintInstance { | |||
val jobId = scalaSource("jobId").asInstanceOf[String] | |||
val sessionId = scalaSource("sessionId").asInstanceOf[String] | |||
val lastUpdateTime = scalaSource("lastUpdateTime").asInstanceOf[Long] | |||
val jobStartTime = scalaSource("jobStartTime").asInstanceOf[Long] | |||
// Safely extract 'jobStartTime' considering potential null or absence |
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.
duplicate log
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.
removed
Signed-off-by: Kaituo Li <[email protected]>
Description
Testing:
Issues Resolved
#152
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.