feat: include most recent job progress in post condition error message [DHIS2-18751] #19621
+204
−385
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
While the plan was just to add a better post-condition logging I found that executing jobs manually was broken and so I did the post spring 6 cleanup in this context as well.
Post-condition Logging
failWithPostCondition
flag to theTEST
job so a post-condition failure could be simulatedScheduling with Spring 6
JobExecutionService
for the execution of one-off jobs to have a layer for right TX handlinggetByUidNoAcl
whenever a job is loaded within the scheduling so make sure ACL isn't in the waylastAlive
counter with zero so the first update happens immediately giving faster feedback for the observer that the job is actually runninggetSingleResult()
with eithergetSingleResult(Query)
orgetResultStream().findFirst().orElse(null)
NotFoundException
from being thrown when callingexecuteOnceNow
(one-off jobs)Automatic Testing
There are plenty of tests covering scheduling. Also once must check that the e2e tests run in about 10-15min not 90min.
Manual Testing
TEST
failWithPostCondition
totrue
Example: