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

TFS Plugin 4.0.0 returning null for remote changesets

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Component/s: tfs-plugin
    • Labels:
      None
    • Environment:
      TFS-Plugin 4.0.0, Team Foundation Server 2013, Jenkins 1.6.38, JRE 1.8, Mac OSX 10.11.3
    • Similar Issues:

      Description

      TFS Plugin 4.0.0 gives and error while querying for the changeset. I get the same error for all projects built from this machine. Verified that TFS SDK for Java is installed with the plugin and also TEE CLC, though its marked as not required for the 4.0 version. The project is developed in XCode and stored in TFS using the git-tf plugin for Mac OSX.

      created by Team Build                                                                                     
      Querying for remote changeset at '$/xxxxx/_git/xxxx' as of 'D2016-03-02T18:51:31Z'...
      Query returned no result!
      FATAL: null
      java.lang.NullPointerException
      	at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:194)
      	at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:189)
      	at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:205)
      	at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:262)
      	at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:211)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      	at hudson.model.Run.execute(Run.java:1738)
      	at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Finished: FAILURE
      

        Attachments

          Activity

          Hide
          oli_at_jsi Olivier Dagenais added a comment - - edited

          Are you pointing the TFS plugin at a Git repo or a TFVC repo?

          Or did you mean that you interacted with a TFVC repo using Git through the git-tf tool?

          If it's TFVC, can you confirm that the values look like the following?

          Server URL http://tfs.example.com:8080/tfs/collection
          Project Path $/TeamProject/path/to/project

          ...such that you could combine those values into a valid TFS code explorer URL, as follows:

          http://tfs.example.com:8080/tfs/collection/_versionControl#path=$/TeamProject/path/to/project&_a=contents

          ...and that indeed shows you the contents of the folder you would expect Jenkins to check out?

          Thanks!
          - Oli

          Show
          oli_at_jsi Olivier Dagenais added a comment - - edited Are you pointing the TFS plugin at a Git repo or a TFVC repo? Or did you mean that you interacted with a TFVC repo using Git through the git-tf tool? If it's TFVC, can you confirm that the values look like the following? Server URL http://tfs.example.com:8080/tfs/collection Project Path $/TeamProject/path/to/project ...such that you could combine those values into a valid TFS code explorer URL, as follows: http://tfs.example.com:8080/tfs/collection/_versionControl#path=$/TeamProject/path/to/project&_a=contents ...and that indeed shows you the contents of the folder you would expect Jenkins to check out? Thanks! - Oli
          Hide
          mahithach Mahitha Chalasani added a comment -

          Thanks for getting back Oli!
          The Jenkins TFS plug-in is pointing to a TFVC Repo.
          And yes, the server URL and project path are in the given format. Can get to the project content folder by combining them both minus the '$'.

          If the Project path is given without the '$', it spits out the below error, even though the workspace is created for the corresponding job. Any thoughts?

          Querying for remote changeset at 'xxxxxx/_git/xxxx' as of 'D2016-03-03T18:35:23Z'...
          FATAL: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ItemNotMappedException: There is no working folder mapping for /xxxxx/_git/xxxx.
          java.lang.RuntimeException: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ItemNotMappedException: There is no working folder mapping for /xxxxxx/_git/xxxx.
          	at hudson.plugins.tfs.model.Server.execute(Server.java:157)
          	at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:272)
          	at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:268)
          	at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:284)
          	at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:311)
          	at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:260)
          	at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
          	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          	at hudson.model.Run.execute(Run.java:1738)
          	at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:410)
          Caused by: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ItemNotMappedException: There is no working folder mapping for /xxxxx/_git/xxxx.
          	at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.getLocalWorkspace(VersionControlClient.java:737)
          	at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.getWorkspace(VersionControlClient.java:2154)
          	at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.determineWorkspaceNameAndOwner(VersionControlClient.java:6934)
          	at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.determineWorkspaceNameAndOwner(VersionControlClient.java:6793)
          	at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.determineWorkspaceNameAndOwner(VersionControlClient.java:6816)
          	at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.queryHistory(VersionControlClient.java:4622)
          	at hudson.plugins.tfs.model.MockableVersionControlClient.queryHistory(MockableVersionControlClient.java:116)
          	at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:65)
          	at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:33)
          	at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
          	at hudson.plugins.tfs.model.Server.execute(Server.java:153)
          	... 13 more
          Finished: FAILURE
          

          Thanks!

          Show
          mahithach Mahitha Chalasani added a comment - Thanks for getting back Oli! The Jenkins TFS plug-in is pointing to a TFVC Repo. And yes, the server URL and project path are in the given format. Can get to the project content folder by combining them both minus the '$'. If the Project path is given without the '$', it spits out the below error, even though the workspace is created for the corresponding job. Any thoughts? Querying for remote changeset at 'xxxxxx/_git/xxxx' as of 'D2016-03-03T18:35:23Z' ... FATAL: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ItemNotMappedException: There is no working folder mapping for /xxxxx/_git/xxxx. java.lang.RuntimeException: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ItemNotMappedException: There is no working folder mapping for /xxxxxx/_git/xxxx. at hudson.plugins.tfs.model.Server.execute(Server.java:157) at hudson.plugins.tfs.model.Project.extractChangesetNumber(Project.java:272) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:268) at hudson.plugins.tfs.model.Project.getRemoteChangesetVersion(Project.java:284) at hudson.plugins.tfs.TeamFoundationServerScm.recordWorkspaceChangesetVersion(TeamFoundationServerScm.java:311) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:260) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1738) at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: com.microsoft.tfs.core.clients.versioncontrol.exceptions.ItemNotMappedException: There is no working folder mapping for /xxxxx/_git/xxxx. at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.getLocalWorkspace(VersionControlClient.java:737) at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.getWorkspace(VersionControlClient.java:2154) at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.determineWorkspaceNameAndOwner(VersionControlClient.java:6934) at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.determineWorkspaceNameAndOwner(VersionControlClient.java:6793) at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.determineWorkspaceNameAndOwner(VersionControlClient.java:6816) at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.queryHistory(VersionControlClient.java:4622) at hudson.plugins.tfs.model.MockableVersionControlClient.queryHistory(MockableVersionControlClient.java:116) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:65) at hudson.plugins.tfs.commands.RemoteChangesetVersionCommand.call(RemoteChangesetVersionCommand.java:33) at hudson.remoting.LocalChannel.call(LocalChannel.java:45) at hudson.plugins.tfs.model.Server.execute(Server.java:153) ... 13 more Finished: FAILURE Thanks!
          Hide
          mahithach Mahitha Chalasani added a comment - - edited

          Before throwing the above error, the build also lists all the workspaces on the owner computer

          Listing workspaces from http://tfsxxxxxxx:8080/tfs/collection...
          Workspace Owner Computer Comment  
          ---------------------------------------------------------------- ------------------------- --------------- ------------------------------------------------
          Thousands of workspaces listed here. 
          

          Can this be one of the causes for the fetch remote changeset on the current repository to fail?

          Show
          mahithach Mahitha Chalasani added a comment - - edited Before throwing the above error, the build also lists all the workspaces on the owner computer Listing workspaces from http: //tfsxxxxxxx:8080/tfs/collection... Workspace Owner Computer Comment ---------------------------------------------------------------- ------------------------- --------------- ------------------------------------------------ Thousands of workspaces listed here. Can this be one of the causes for the fetch remote changeset on the current repository to fail?
          Hide
          oli_at_jsi Olivier Dagenais added a comment -

          The suffusion of workspaces in the listing is a defect I inadvertently introduced when I updated that code to use the TFS SDK. It's being tracked as JENKINS-30330.

          Show
          oli_at_jsi Olivier Dagenais added a comment - The suffusion of workspaces in the listing is a defect I inadvertently introduced when I updated that code to use the TFS SDK. It's being tracked as JENKINS-30330 .
          Hide
          kelliejos Kellie Jos added a comment -

          Thank you for using the tfs-plugin. It appears that your issue was found in an older version of the plugin. There have been a number of improvements made in the recent releases that may have resolved your issue. Please update to the most recent 5.126.0 release. If your issue persists, please open a new ticket and we will investigate.

          Show
          kelliejos Kellie Jos added a comment - Thank you for using the tfs-plugin. It appears that your issue was found in an older version of the plugin. There have been a number of improvements made in the recent releases that may have resolved your issue. Please update to the most recent 5.126.0 release. If your issue persists, please open a new ticket and we will investigate.

            People

            Assignee:
            dastahel David Staheli
            Reporter:
            mahithach Mahitha Chalasani
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: