Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-8556

BB's implementation of SAL scheduling API has serializability requirement that's not in the API contract

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Low Low
    • None
    • None
    • Plugin Development
    • None

      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.

            [BSERV-8556] BB's implementation of SAL scheduling API has serializability requirement that's not in the API contract

            No work has yet been logged on this issue.

              Unassigned Unassigned
              ebishop Eli Bishop (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: