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

TFS SCM Polling: FATAL: Parse error. Unable to find an item within a changeset

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • tfs-plugin
    • None
    • Windows XP Pro SP3

    Description

      SCM polling is getting "Fatal Parse Error". See attached log. Here is error message:

      FATAL: Parse error. Unable to find an item within a changeset. Please report this as a bug. Changesetdata = "
      Changeset: 1501840
      User: TLR\U0096898
      Date: Dec 26, 2012 3:00:15 PM
      Comment:
      jQuery UI Upgrade

      ".
      ha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=null
      FATAL: Aborted
      ha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=Done. Took 6.6 sec
      No changes

      Attachments

        Activity

          jeffolson jeffolson added a comment -

          Thank you! I no longer work on a project that uses TFS, but I will pass this on to some of my colleagues on my old team.

          jeffolson jeffolson added a comment - Thank you! I no longer work on a project that uses TFS, but I will pass this on to some of my colleagues on my old team.

          Fixed by switching to TFS SDK for Java and no longer parsing the output of the CLC.

          oli_at_jsi Olivier Dagenais added a comment - Fixed by switching to TFS SDK for Java and no longer parsing the output of the CLC.
          davidclark david clark added a comment -

          On further investigation, the commit message is the issue:

          I am using git-tf to send from my git repo to tfs. I had --metadata set to true. This converts your git commit messages like "blah" to something like:

          "Commit abcdef (Tue May 21 14:19:15 2013 +1000)
          Author: David Clark <david.clark@[redacted].com>
          Committer: David Clark <david.clark@[redacted].com>
          -----------------------------------------------------------------
          blah
          "

          Which is causing the parse error in the polling. (Due to "---" it seems).

          BTW: for anyone with a repo in this state you can fix it by:

          1. git tf configure --no-metadata
          2. push a change OR using team explorer, edit the last change set comment to not contain "---"

          davidclark david clark added a comment - On further investigation, the commit message is the issue: I am using git-tf to send from my git repo to tfs. I had --metadata set to true. This converts your git commit messages like "blah" to something like: "Commit abcdef (Tue May 21 14:19:15 2013 +1000) Author: David Clark <david.clark@ [redacted] .com> Committer: David Clark <david.clark@ [redacted] .com> ----------------------------------------------------------------- blah " Which is causing the parse error in the polling. (Due to "---" it seems). BTW: for anyone with a repo in this state you can fix it by: 1. git tf configure --no-metadata 2. push a change OR using team explorer, edit the last change set comment to not contain "---"
          davidclark david clark added a comment - - edited

          I am having the same issue, however the commit message is not the problem.
          Also: The TFS server poller fails forever after a tfs checkin. However, if I manually run the build it will fail once, then work on the next try.

          Here is the log:

          Started on May 3, 2013 5:38:07 PM
          [workspace] $ /Applications/TEE-CLC-10.0.0/tf history "$/Hotel Search iPhone" -noprompt -version:D2013-05-03T07:32:40Z~D2013-05-03T07:38:08Z -recursive -format:detailed -server:http://tfs2012:8080/tfs ********
          Changeset: 40495
          User: AAA\DavidC
          Date: May 3, 2013 5:37:50 PM
          
          Comment:
            Commit 853906c (Fri May 03 17:37:43 2013 +1000)
          Author: David Clark <david.clark@hotelscombined.com>
          Committer: David Clark <david.clark@hotelscombined.com>
          -----------------------------------------------------------------
              version bump to test CI
          
          
          
          Items:
            edit $/Hotel Search iPhone/HCWeb/HCWeb-Info.plist
          
          FATAL: Parse error. Unable to find an item within a changeset.  Please report this as a bug.  Changesetdata = "
          Changeset: 40495
          User: AAA\DavidC
          Date: May 3, 2013 5:37:50 PM
          Comment:
            Commit 853906c (Fri May 03 17:37:43 2013 +1000)
          Author: David Clark <david.clark@hotelscombined.com>
          Committer: David Clark <david.clark@hotelscombined.com>
          
          ".
          null
          FATAL: Aborted
          Done. Took 4.1 sec
          No changes
          
          davidclark david clark added a comment - - edited I am having the same issue, however the commit message is not the problem. Also: The TFS server poller fails forever after a tfs checkin. However, if I manually run the build it will fail once, then work on the next try. Here is the log: Started on May 3, 2013 5:38:07 PM [workspace] $ /Applications/TEE-CLC-10.0.0/tf history "$/Hotel Search iPhone" -noprompt -version:D2013-05-03T07:32:40Z~D2013-05-03T07:38:08Z -recursive -format:detailed -server:http://tfs2012:8080/tfs ******** Changeset: 40495 User: AAA\DavidC Date: May 3, 2013 5:37:50 PM Comment: Commit 853906c (Fri May 03 17:37:43 2013 +1000) Author: David Clark <david.clark@hotelscombined.com> Committer: David Clark <david.clark@hotelscombined.com> ----------------------------------------------------------------- version bump to test CI Items: edit $/Hotel Search iPhone/HCWeb/HCWeb-Info.plist FATAL: Parse error. Unable to find an item within a changeset. Please report this as a bug. Changesetdata = " Changeset: 40495 User: AAA\DavidC Date: May 3, 2013 5:37:50 PM Comment: Commit 853906c (Fri May 03 17:37:43 2013 +1000) Author: David Clark <david.clark@hotelscombined.com> Committer: David Clark <david.clark@hotelscombined.com> ". null FATAL: Aborted Done. Took 4.1 sec No changes
          jeffolson jeffolson added a comment - - edited

          Here is a test that demonstrates the problem. Add this to DetailedHistoryCommandTest:

              @Bug(16208)
              @Test
              public void assertChangesetSeparatorAllowedWithinComment() throws Exception {
                  StringBuilder builder = new StringBuilder("-------------------------------------------------------------------------------\n" +
                          "Changeset: 123456\n" +
                          "User: domain\\somebody\n" +
                          "Date: Dec 26, 2012 3:00:15 PM\n" +
                          "\n" +
                          "Comment:\n" +
                          "  Some comment goes here\n" +
                          "------------------------------------------------------------------\n" +
                          "  more of my comment\n" +
                          "\n" +
                          "\n" +
                          "Items:\n" +
                          "  edit $/somepath/to/file\n" +
                          "\n" +
                          "Check-in Notes:\n" +
                          "  Dependencies: none\n" +
                          "  Developer Notes: none \n"
                  );
          
                  StringReader stringReader = new StringReader(builder.toString());
                  DetailedHistoryCommand command = new DetailedHistoryCommand(mock(ServerConfigurationProvider.class), "$/tfsandbox", Util.getCalendar(2008, 01, 15), Calendar.getInstance());
                  List<ChangeSet> list = command.parse(stringReader);
                  assertEquals("Number of change sets was incorrect", 1, list.size());
              }
          
          jeffolson jeffolson added a comment - - edited Here is a test that demonstrates the problem. Add this to DetailedHistoryCommandTest: @Bug(16208) @Test public void assertChangesetSeparatorAllowedWithinComment() throws Exception { StringBuilder builder = new StringBuilder( "-------------------------------------------------------------------------------\n" + "Changeset: 123456\n" + "User: domain\\somebody\n" + "Date: Dec 26, 2012 3:00:15 PM\n" + "\n" + "Comment:\n" + " Some comment goes here\n" + "------------------------------------------------------------------\n" + " more of my comment\n" + "\n" + "\n" + "Items:\n" + " edit $/somepath/to/file\n" + "\n" + "Check-in Notes:\n" + " Dependencies: none\n" + " Developer Notes: none \n" ); StringReader stringReader = new StringReader(builder.toString()); DetailedHistoryCommand command = new DetailedHistoryCommand(mock(ServerConfigurationProvider.class), "$/tfsandbox" , Util.getCalendar(2008, 01, 15), Calendar.getInstance()); List<ChangeSet> list = command.parse(stringReader); assertEquals( " Number of change sets was incorrect" , 1, list.size()); }
          jeffolson jeffolson added a comment -

          Dig a little digging on this....looks like the problem is that our developer used "------------" within his changeset comment. This causes the code at line 247 of DetailedHistoryCommand (in the ChangeSetStringReader.readChangeSet method) to think that a new changeset is starting. We can fix the comment for now to avoid the problem. Is there any way to make the ChangeSetStringReader parser smarter somehow?

          jeffolson jeffolson added a comment - Dig a little digging on this....looks like the problem is that our developer used "------------" within his changeset comment. This causes the code at line 247 of DetailedHistoryCommand (in the ChangeSetStringReader.readChangeSet method) to think that a new changeset is starting. We can fix the comment for now to avoid the problem. Is there any way to make the ChangeSetStringReader parser smarter somehow?

          People

            jeffolson jeffolson
            jeffolson jeffolson
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: