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

Maven Plugin should dismiss MavenProbeAction when reading configuration from the disk

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • maven-plugin
    • None

      It is a follow-up to https://github.com/jenkinsci/maven-plugin/pull/109#pullrequestreview-87462239

      According to Javadoc there should be always deleted upon build completion and hence it should be never serialized/deserialized with XStream... But Javadoc is not correct. This action may get to the disk if a whatever logic calls save() on a running Maven build. And I see such cases in PCT which I performed for JEP-200 (e.g. for Config File Provider). It may also happen in production when a Jenkins instance gets force killed with a running Maven build.

      I propose to modify "readResolve()" and "writeReplace()" logic in AbstractMavenBuild in order to drop MavenProbeAction when serializing/deserializing objects

          [JENKINS-48886] Maven Plugin should dismiss MavenProbeAction when reading configuration from the disk

          Jesse Glick added a comment -

          You could. But why bother? After PR 109, it is harmless.

          If you do care, rather than serialization tricks, it would be better to use TransientActionFactory to supply a flyweight action on demand for running builds.

          Jesse Glick added a comment - You could. But why bother? After PR 109, it is harmless. If you do care, rather than serialization tricks, it would be better to use TransientActionFactory to supply a flyweight action on demand for running builds.

            Unassigned Unassigned
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: