After update of nodejs-plugin from 1.2.9 to 1.3.0 the jobs, which use it, started to fail with the following stacktrace:
After some research and debugging I figured out the root of this issue. The plugin introduced cache locator strategy in commit 32039bd. It also guarantees that cache locator strategy cannot be null both after calling the constructor and calling the appropriate setter method. But that applies only if we create a new job or change the configuration for nodejs for an existing job, using nodejs-plugin 1.3.0. The config.xml of the job looks like that then:
But if you have an existing job, which was created before nodejs-plugin 1.3.0, it is missing the configuration for cache locator strategy. Here is an example config.xml:
And apparently the instance of NodeJSBuildWrapper isn't built via constructor but via straight object deserialization and the field is missing.
Anway the fact is: all my nodejs jobs became broken after that update. Would it be possible to have a global fix for that?