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

Basic Branch 1.3 thows AbstractMethodError not Fully Backwards Compatible

XMLWordPrintable

      first mentioned in JENKINS-38552

      I was asked to assign to fbelzunc by stephenconnolly

      after upgrading to 1.3 i started getting this in my logs

      SCMEventListener.onSCMHeadEvent(SCMHeadEvent) jenkins.branch.MultiBranchProject$SCMEventListenerImpl@1cf8cddc propagated an exception
      java.lang.AbstractMethodError: jenkins.branch.BranchBuildStrategy.isAutomaticBuild(Ljenkins/scm/api/SCMSource;Ljenkins/scm/api/SCMHead;Ljenkins/scm/api/SCMRevision;Ljenkins/scm/api/SCMRevision;Lhudson/model/TaskListener;)Z
      	at jenkins.branch.buildstrategies.basic.AllBranchBuildStrategyImpl.isAutomaticBuild(AllBranchBuildStrategyImpl.java:77)
      	at jenkins.branch.BranchBuildStrategy.automaticBuild(BranchBuildStrategy.java:190)
      	at jenkins.branch.MultiBranchProject.isAutomaticBuild(MultiBranchProject.java:2231)
      	at jenkins.branch.MultiBranchProject.access$1200(MultiBranchProject.java:125)
      	at jenkins.branch.MultiBranchProject$SCMHeadObserverImpl.observe(MultiBranchProject.java:2076)
      	at jenkins.scm.api.SCMHeadObserver$Wrapped.observe(SCMHeadObserver.java:638)
      	at jenkins.scm.api.SCMHeadEvent$Validated.observe(SCMHeadEvent.java:295)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:357)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:249)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:917)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:327)
      	at jenkins.branch.MultiBranchProject$SCMEventListenerImpl.processHeadUpdate(MultiBranchProject.java:1576)
      	at jenkins.branch.MultiBranchProject$SCMEventListenerImpl.onSCMHeadEvent(MultiBranchProject.java:1177)
      	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246)
      	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229)
      	at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:479)
      	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
       

       

      the issue is the all/none/any wrapper strategies now assume any wrapped strategy implements the new interface method...however older plugin will NOT implement such a method.

      Could add another interface inbetween, or use reflection, or try catch to make this all work.

      but as is...backwards compatability from 1.2 to 1.3 is not maintained.

       

      commented in PR too https://github.com/jenkinsci/basic-branch-build-strategies-plugin/pull/4/files#r274398090

       

      this causes all builds to not execute wherever any/all/none are used.

       

       

      Think of it like this.  i have build stategy plugin X published last month that implementx branc-api 2.3.

      you have updated basic build strategies to REQUIRE all other build strategies now implement 2.4 (and in most recent pr now 2.4.1)  but the author of plugin X isn't ready for that..and there's no update. now we can't use plugin X anymore.

       

            fbelzunc Félix Belzunce Arcos
            drdamour chirs damour
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: