Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41063

SSE GW Plugin: Serializable EventDispatcher contains non-serializable fields

    Details

    • Epic Link:
    • Similar Issues:

      Description

      I was prototyping some code around Session management in Jenkins with standard Jetty's HashSessionManager. This session manager tries to serialize sessions and their attributes to the disk. In Jetty all session attributes are supposed to be serializable, especially if they declare the Serializable interface.

      In SSE Plugin EventDispather instances cannot be really serialized, because classes like PubSubBus and Authentication instances are not serializable in Jenkins core it causes failures in Session management.

        Attachments

          Activity

          Hide
          tfennelly Tom FENNELLY added a comment -

          I don't plan on doing anything more on this until after we have more details of how this might be used in a clustering env. I'm not going to remove the Serializable interface marker because that will result in some Servlet containers barfing on it completely.

          Also, making some of the fields serializable is just a waste of time too imo, because there's a lot more to making it actually work in a clustered env - the backend event bus subscriptions need to be re-established too etc, or the client will just stop receiving events. If the sessions are not sticky and browsers are constantly being assigned to a replicated session on a different node, then I'd bet that will cause a litany of other ugly issues.

          TL;DR ... we need to figure out how clustering might work before doing a "real" fix for this. Anything else is just sweeping crap under the carpet.

          Show
          tfennelly Tom FENNELLY added a comment - I don't plan on doing anything more on this until after we have more details of how this might be used in a clustering env. I'm not going to remove the Serializable interface marker because that will result in some Servlet containers barfing on it completely. Also, making some of the fields serializable is just a waste of time too imo, because there's a lot more to making it actually work in a clustered env - the backend event bus subscriptions need to be re-established too etc, or the client will just stop receiving events. If the sessions are not sticky and browsers are constantly being assigned to a replicated session on a different node, then I'd bet that will cause a litany of other ugly issues. TL;DR ... we need to figure out how clustering might work before doing a "real" fix for this. Anything else is just sweeping crap under the carpet.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          James Dumay Tom FENNELLY IIRC you were going to fix it before the public Blue Ocean release. Were there any changes in the plan?

          Show
          oleg_nenashev Oleg Nenashev added a comment - James Dumay Tom FENNELLY IIRC you were going to fix it before the public Blue Ocean release. Were there any changes in the plan?
          Hide
          jamesdumay James Dumay added a comment -

          We don't have this on the plan to fix before 1.0 however there is some work going on at the moment to make SSE work across sessions and it may fix this incidentally - Vivek Pandey have you run into this with your current project?

          Show
          jamesdumay James Dumay added a comment - We don't have this on the plan to fix before 1.0 however there is some work going on at the moment to make SSE work across sessions and it may fix this incidentally - Vivek Pandey have you run into this with your current project?
          Hide
          tfennelly Tom FENNELLY added a comment -

          Actually this was fixed back in Jan in v1.12 of the plugin. Not sure why it was not closed.

          Show
          tfennelly Tom FENNELLY added a comment - Actually this was fixed back in Jan in v1.12 of the plugin. Not sure why it was not closed.
          Hide
          jamesdumay James Dumay added a comment -

          Oh nice one

          Show
          jamesdumay James Dumay added a comment - Oh nice one

            People

            • Assignee:
              tfennelly Tom FENNELLY
              Reporter:
              oleg_nenashev Oleg Nenashev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: