Closed Foxcapades closed 1 month ago
Problematic snippet:
// filter out already-expired jobs
.filter(jobId -> !JobStatus.Expired.equals(AsyncPlatform.getJob(jobId).getStatus()))
AsyncPlatform.getJob(...)
may return null, causing .getStatus()
to lead to an NPE.
If multiple requests are accidentally made to the bulk compute job expiration endpoint there exists a race condition in the expiration controller that can lead to a harmless 500. To avoid this 500 the stream processing in
ExpirationController::findJobs
should ensure that target job objects are not null before testing the expected object's status property.