saveourtool/save-cloud
在 GitHub 查看"Error in JGit API" when attempting to fetch a test source while no Git tag is selected
Open
#1,706 建立於 2023年1月10日
buggood first issue
倉庫指標
- Star
- (38 star)
- PR 合併指標
- (PR 指標待抓取)
描述
The UI allows to press the "Fetch"button even though no tag/branch/commit is selected:

On the preprocessor side, this results in:
18:05:41.166 [reactor-http-nio-3] ERROR c.s.s.p.s.GitPreprocessorService - Failed to clone git repository https://github.com/0x6675636b796f75676974687562/save-flaky-tests.git java.lang.IllegalStateException: Error in JGit API
at com.saveourtool.save.preprocessor.utils.GitUtilKt.withRethrow(GitUtil.kt:163)
at com.saveourtool.save.preprocessor.utils.GitUtilKt.gitCallWithRethrow(GitUtil.kt:151)
at com.saveourtool.save.preprocessor.utils.GitUtilKt.callWithRethrow(GitUtil.kt:155)
at com.saveourtool.save.preprocessor.utils.GitUtilKt.doCloneToDirectory(GitUtil.kt:126)
at com.saveourtool.save.preprocessor.utils.GitUtilKt.doCloneToDirectory$default(GitUtil.kt:108)
Caused by: org.eclipse.jgit.api.errors.TransportException: Remote branch 'null' not found in upstream origin
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:246)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:325)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:191)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:1)
at com.saveourtool.save.preprocessor.utils.GitUtilKt$callWithRethrow$1.invoke(GitUtil.kt:156)
Caused by: org.eclipse.jgit.errors.TransportException: Remote branch 'null' not found in upstream origin
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:155)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:103)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1462)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:235)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:325)
followed by
18:05:41.167 [reactor-http-nio-3] ERROR c.s.s.p.c.TestSuitesPreprocessorController - Failed to fetch from null java.lang.IllegalStateException: Error in JGit API
at com.saveourtool.save.preprocessor.utils.GitUtilKt.withRethrow(GitUtil.kt:163)
at com.saveourtool.save.preprocessor.utils.GitUtilKt.gitCallWithRethrow(GitUtil.kt:151)
at com.saveourtool.save.preprocessor.utils.GitUtilKt.callWithRethrow(GitUtil.kt:155)
at com.saveourtool.save.preprocessor.utils.GitUtilKt.doCloneToDirectory(GitUtil.kt:126)
at com.saveourtool.save.preprocessor.utils.GitUtilKt.doCloneToDirectory$default(GitUtil.kt:108)
Caused by: org.eclipse.jgit.api.errors.TransportException: Remote branch 'null' not found in upstream origin
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:246)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:325)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:191)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:1)
at com.saveourtool.save.preprocessor.utils.GitUtilKt$callWithRethrow$1.invoke(GitUtil.kt:156)
Caused by: org.eclipse.jgit.errors.TransportException: Remote branch 'null' not found in upstream origin
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:155)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:103)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1462)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:235)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:325)
BTW, the
There are no tags in ...
message is incorrect in my particular case, so the preprocessor should probably return HTTP 500 instead of HTTP 404 in case of an internal error.