Celebration time!

I’m pleased to announce the release of JobRunr v5.1.0 (which is now available via Maven Central) and JobRunr Pro v5.1.0 which is available for customers with a subscription. Major highlights are Kotlin 1.6.20 support and an important bugifx.

New features in JobRunr

This release again adds quite some new improvements to JobRunr:

  • Kotlin 1.6.20 support: Thanks to some input of our friends at JetBrains, JobRunr now supports Kotlin 1.6.20. A big change happened inside Kotlin with 1.6.20: before 1.6.20, the Kotlin compiler created bytecode which differed a lot with standard Java code compiled by javac. This is now completely inline with each other which means that Kotlin support in JobRunr will from now on be better.

Important bugfix

  • Background Job Server crash in case of unknown job parameters: JobRunr serializes the details of a job to JSON - including class name, method name and all the parameters. On startup, JobRunr by default already checks whether all jobs exist (e.g. classes moved because of refactoring, … ). If they do not exist, this is shown in the dashboard. However sometimes Job Parameters change (e.g. due to refactoring) and they are not deserializable anymore. In this case, JobRunr would stop processing jobs due to too many deserialization exceptions. This is now solved and the job just fails.
  • Micronaut DataSource and Transactions fix: When using Transaction support in Micronaut, the DataSource is wrapped by a DelegatingDataSource. As JobRunr Free uses the DataSource, this caused an io.micronaut.transaction.exceptions.NoTransactionException. This has now also been solved.
  • usJsonMapper: JobRunrConfiguration.useJsonMapper doesn’t update internal JobMapper. If you provided your own JsonMapper, this was not used in all cases. This bug has now been solved.
  • ClosedFileSystemException: A race condition caused an java.nio.file.ClosedFileSystemException exception in some cases which is now solved.
  • @Job annotation not always found: it was brought to my attention that in some special cases (mostly Kotlin), JobRunr could not find the Job annotation. This has also been solved thanks to @pyos from JetBrains.

New features in JobRunr Pro

JobRunr Pro also received an important new feature:

  • JobRegressionGuard: Code changes - we get new insights and we refactor - it’s part of our daily live. JobRunrPro now includes the JobRegressionGuard: it’s a simple unit (or is it an integration?) test that you can add in your code and which makes sure that all existing jobs in production still work after your refactoring. Using it could not be easier:
@Test
void validateExistingJobs() {
    JobRegressionGuard jobRegressionGuard = new JobRegressionGuard();
    jobRegressionGuard.validateJobs("<url to your staging/production dashboard>");
}
  • SearchRequestBuilder: Are you using the StorageProvider api in your code to get certain Jobs? Well, in that case the SearchRequestBuilder comes in handy. It allows you to quickly search for jobs by name, job signature, … .

Special thanks to @pixnbit for his PR regarding Micronaut DataSource and Transactions.

Help wanted!

I’m looking for some help on using Redis. Is there anybody with some good Redis knowledge who can help me out? Eternal gratitude will be yours…

All improvements & bugfixes

  • GitHub issue 416: Kotlin 1.6.20 causes JobMethodNotFoundException
  • GitHub issue 432: JobRunrConfiguration.useJsonMapper doesn’t update internal JobMapper
  • GitHub issue 431: The background server stops if JobDetails are not deserializable.
  • GitHub issue 427: java.nio.file.ClosedFileSystemException
  • GitHub PR 423: Fix Micronaut Data No current transaction present. Consider declaring @Transactional on the surrounding method error

On top of that JobRunr now also shares some anonymous data usage (the amount of succeeded jobs) for marketing purposes (a counter on the website how many jobs in total were processed by JobRunr ๐Ÿ˜‚). Of course you can opt-out for this using a simple setting.