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

Basic Branch 1.3 thows AbstractMethodError not Fully Backwards Compatible

    Details

    • Similar Issues:

      Description

      first mentioned in JENKINS-38552

      I was asked to assign to Félix Belzunce Arcos by Stephen Connolly

      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.

       

        Attachments

          Activity

          Show
          drdamour chirs damour added a comment - others reporting same issue https://issues.jenkins-ci.org/browse/JENKINS-48296?focusedCommentId=364779&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-364779
          Hide
          stephenconnolly Stephen Connolly added a comment -

          The 1.3.1 release of basic-branch-build-strategies should fix the incorrect usage of SPI issue that causes this exception, not closing this however as the API changes required to fix the behavioural regressions introduced in the initial implementation of JENKINS-38552 will need to be replicated for these too

          Show
          stephenconnolly Stephen Connolly added a comment - The 1.3.1 release of basic-branch-build-strategies should fix the incorrect usage of SPI issue that causes this exception, not closing this however as the API changes required to fix the behavioural regressions introduced in the initial implementation of  JENKINS-38552 will need to be replicated for these too

            People

            • Assignee:
              fbelzunc Félix Belzunce Arcos
              Reporter:
              drdamour chirs damour
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: