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

UnsupportedOperationException when "Notify Build Start" notification enabled and TFS SCM is used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: slack-plugin
    • Labels:
      None
    • Environment:
      Operating System: Windows Server 2008 R2
      Java runtime: 1.8.0_20-b26
      Jenkins: 1.631
      slack: 1.8
      tfs: 4.0.0
    • Similar Issues:

      Description

      If a job is configured to use Slack to send "Notify Build Start" notifications and also uses the TFS source control plugin, this exception is logged in the build output:

      FATAL: getAffectedFiles() is not implemented by this SCM
      java.lang.UnsupportedOperationException: getAffectedFiles() is not implemented by this SCM
      at hudson.scm.ChangeLogSet$Entry.getAffectedFiles(ChangeLogSet.java:242)
      at jenkins.plugins.slack.ActiveNotifier.getChanges(ActiveNotifier.java:151)
      at jenkins.plugins.slack.ActiveNotifier.started(ActiveNotifier.java:86)
      at jenkins.plugins.slack.SlackNotifier$SlackJobProperty.prebuild(SlackNotifier.java:307)
      at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:834)
      at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:829)
      at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:825)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:408)
      Skipped archiving because build is not successful
      Finished: FAILURE

      See this link for a similar bug (and a fix) that affected the hipchat plugin:

      https://github.com/jlewallen/jenkins-hipchat-plugin/pull/60

      The workaround is to disable the "Notify Build Start" option for the Slack plugin.

        Attachments

          Activity

          Hide
          samuca Samuel Cabral added a comment -

          I have the same issue on my project.

          Show
          samuca Samuel Cabral added a comment - I have the same issue on my project.
          Hide
          manul9 Konstantin Belov added a comment - - edited

          The same issue appears with P4 SCM (Perforce).

          • Jenkins: 1.642.1
          • P4 Plugin: 1.3.7
          • SCM API plugin: 1.0
          • Slack Notification plugin: 1.8.1
          Show
          manul9 Konstantin Belov added a comment - - edited The same issue appears with P4 SCM (Perforce). Jenkins: 1.642.1 P4 Plugin: 1.3.7 SCM API plugin: 1.0 Slack Notification plugin: 1.8.1

            People

            Assignee:
            kmadel Kurt Madel
            Reporter:
            wesleysmith Wesley Smith
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: