Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1222

Git pach parser fails on Status T

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: libraries
    • Labels:
      None

      Description

      In a recent PR for amber-docs, a file was replaced by a symlink, which turned up as status "T" in the git patch file. This causes the Skara parser to fail as it doesn't know about this status value.

      PR: https://github.com/openjdk/amber-docs/pull/10

      Stacktrace:
      java.lang.RuntimeException: Exception during jcheck
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.CheckRun.checkStatus(CheckRun.java:1017)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.CheckRun.execute(CheckRun.java:97)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.CheckWorkItem.run(CheckWorkItem.java:351)
      at org.openjdk.skara.bot/org.openjdk.skara.bot.BotRunner$RunnableWorkItem.runMeasured(BotRunner.java:190)
      at org.openjdk.skara.bot/org.openjdk.skara.bot.BotRunner$RunnableWorkItem.run(BotRunner.java:146)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
      at java.base/java.lang.Thread.run(Thread.java:831)
      Caused by: java.lang.IllegalArgumentException: Invalid score
      at org.openjdk.skara.vcs/org.openjdk.skara.vcs.Status.from(Status.java:124)
      at org.openjdk.skara.vcs/org.openjdk.skara.vcs.tools.PatchHeader.fromRawLine(PatchHeader.java:93)
      at org.openjdk.skara.vcs/org.openjdk.skara.vcs.tools.GitRawDiffParser.parseRawLines(GitRawDiffParser.java:81)
      at org.openjdk.skara.vcs/org.openjdk.skara.vcs.tools.GitRawDiffParser.parse(GitRawDiffParser.java:208)
      at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitCommitIterator.next(GitCommitIterator.java:83)
      at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitCommitIterator.next(GitCommitIterator.java:32)
      at org.openjdk.skara.jcheck/org.openjdk.skara.jcheck.iterators.MapIterator.next(MapIterator.java:45)
      at org.openjdk.skara.jcheck/org.openjdk.skara.jcheck.iterators.FlatMapIterator.hasNext(FlatMapIterator.java:46)
      at org.openjdk.skara.jcheck/org.openjdk.skara.jcheck.iterators.ConcatIterator.hasNext(ConcatIterator.java:39)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.CheckablePullRequest.executeChecks(CheckablePullRequest.java:197)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.CheckRun.checkStatus(CheckRun.java:920)
      ... 10 more
      Suppressed: java.io.IOException: 'git -c core.quotePath=false log --format=#@!_-=&%n%H%n%P%n%an%n%ae%n%aI%n%cn%n%ce%n%cI%n%B=@=@=@=@=@ --patch --find-renames=90% --find-copies=90% --find-copies-harder --topo-order --binary -c --combined-all-paths --raw --no-abbrev --unified=0 --no-color 37f12336bbaca10e6f5fd3f06318c18445120c04^!' timed out
      at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitCommits.close(GitCommits.java:114)
      at org.openjdk.skara.jcheck/org.openjdk.skara.jcheck.JCheck$Issues.close(JCheck.java:191)
      at org.openjdk.skara.bots.pr/org.openjdk.skara.bots.pr.CheckablePullRequest.executeChecks(CheckablePullRequest.java:195)
      ... 11 more
      Caused by: java.lang.NumberFormatException: For input string: ""
      at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
      at java.base/java.lang.Integer.parseInt(Integer.java:670)
      at java.base/java.lang.Integer.parseInt(Integer.java:778)
      at org.openjdk.skara.vcs/org.openjdk.skara.vcs.Status.from(Status.java:122)
      ... 20 more


      The line that we tried to parse:

      :100644 120000 b4b808887522a635ffea21c1579ffd70703e040a b316cbb5e3bcbd826c0b683a305807a7039d5dbf T Makefile

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: