Details
-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
None
-
None
Description
We found that a cross-product plugin using the PluginScheduler API, which worked in all other products, failed in Bitbucket Server with the following exception:
java.lang.IllegalArgumentException: PluginScheduler requires job data to be Serializable. key={}, valueClass={} at com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter.validateJobData(PluginSchedulerAdapter.java:101) ~[bitbucket-platform-4.0.1.jar:na] at com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter.scheduleJob(PluginSchedulerAdapter.java:47) ~[bitbucket-platform-4.0.1.jar:na]
However, according to the API documentation linked above, it's not true that "PluginScheduler requires job data to be Serializable". The documentation says that the job data map "will always be the same instance that is given to the job when it executes"; if it's serialized and then deserialized, it would not be the same instance. So this seems to be an undocumented deviation from the SAL API contract.
We have worked around this by using atlassian-scheduler-compat for code that needs to work in both Bitbucket and other products, but this is not ideal.
Attachments
Issue Links
- Discovered while testing
-
AMKT-13686 Loading...