History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2605
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: John Szakmeister
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Pull request failing to build because it was rebased.

Created: 17/Dec/15 09:20 PM   Updated: 22/Dec/15 09:23 AM
Component/s: None
Affects Version/s: 6.0.36
Fix Version/s: 6.1.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
This looks like another instance of QB-2151. That issue was fixed, so I don't know if this is a regression or a new bug. This used to work, so it smells like a regression.

At any rate, we use a rebase workflow and we see the following problem around rebased commits. I still want the pull request to kick off (the current head != the previous head, and so we want to see it build again). This is more noticeable in newer versions of GitHub Enterprise, where the Pull Request states that it's waiting for the system to report the status, but it never happens (because QB decided not to build it). For GitHub/GitHub Enterprise, any time the tip of the branch changes, it's expecting a build to occur. Here's the logs surrounding the problem.

2015-12-17 15:49:48,101 [pool-1-thread-10657] INFO com.pmease.quickbuild.CheckConditionJob - Taking repository snapshots...
2015-12-17 15:49:48,105 [pool-1-thread-10657] INFO com.pmease.quickbuild.repositorysupport.Repository - Taking snapshot of repository 'git-repo'...
2015-12-17 15:49:48,105 [pool-1-thread-10657] INFO com.pmease.quickbuild.repositorysupport.Repository - Determining head revision for repository: git-repo
2015-12-17 15:49:49,311 [pool-1-thread-10657] INFO com.pmease.quickbuild.CheckConditionJob - Evaluating build condition...
2015-12-17 15:49:49,327 [pool-1-thread-10657] INFO com.pmease.quickbuild.repositorysupport.Repository - Getting changes of 'git-repo' since build '4.5.6.dev5778'...
2015-12-17 15:49:49,333 [pool-1-thread-10669] ERROR com.pmease.quickbuild.execution.LineConsumer - fatal: bad object ae65f996b0f70a61e4c604e6adce4489689ce364
2015-12-17 15:49:49,335 [pool-1-thread-10657] ERROR com.pmease.quickbuild.plugin.scm.git.GitRepository - Error calculating changes between commit ae65f996b0f70a61e4c604e6adce4489689ce364 and b8bfcf94002185bfb8f6cc907030b53cc83063d8
    com.pmease.quickbuild.QuickbuildException: Failed to run command: git log -1 --date=raw --pretty=format:%cd ae65f996b0f70a61e4c604e6adce4489689ce364
    Command return code: 128
    Command error output: fatal: bad object ae65f996b0f70a61e4c604e6adce4489689ce364
        at com.pmease.quickbuild.execution.Commandline$ExecuteResult.buildException(Commandline.java:489)
        at com.pmease.quickbuild.execution.Commandline$ExecuteResult.checkReturnCode(Commandline.java:504)
        at com.pmease.quickbuild.plugin.scm.helper.ScmCli.run(ScmCli.java:90)
        at com.pmease.quickbuild.plugin.scm.helper.ScmCli.run(ScmCli.java:79)
        at com.pmease.quickbuild.plugin.scm.helper.ScmCli.run(ScmCli.java:71)
        at com.pmease.quickbuild.plugin.scm.git.GitCli.getDateOfRevision(GitCli.java:337)
        at com.pmease.quickbuild.plugin.scm.git.GitCli.changesBetween(GitCli.java:348)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository.getChangesBetween(GitRepository.java:84)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.CGLIB$getChangesBetween$31(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0$$FastClassByCGLIB$$6eaf2d30.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.getChangesBetween(<generated>)
        at com.pmease.quickbuild.plugin.scm.git.GitRepository.getChangesBetween(GitRepository.java:48)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.CGLIB$getChangesBetween$32(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0$$FastClassByCGLIB$$6eaf2d30.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.getChangesBetween(<generated>)
        at com.pmease.quickbuild.repositorysupport.Repository.getChangesSince(Repository.java:507)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.CGLIB$getChangesSince$103(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0$$FastClassByCGLIB$$6eaf2d30.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.getChangesSince(<generated>)
        at com.pmease.quickbuild.repositorysupport.Repository.getChanges(Repository.java:407)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.CGLIB$getChanges$83(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0$$FastClassByCGLIB$$6eaf2d30.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.getChanges(<generated>)
        at com.pmease.quickbuild.repositorysupport.Repository.getChanges(Repository.java:375)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.CGLIB$getChanges$82(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0$$FastClassByCGLIB$$6eaf2d30.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.getChanges(<generated>)
        at com.pmease.quickbuild.repositorysupport.Repository.isChanged(Repository.java:349)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.CGLIB$isChanged$96(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0$$FastClassByCGLIB$$6eaf2d30.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$c0445e0.isChanged(<generated>)
        at com.pmease.quickbuild.setting.configuration.buildcondition.ChangeBasedBuildCondition.isChanged(ChangeBasedBuildCondition.java:43)
        at com.pmease.quickbuild.setting.configuration.buildcondition.BuildIfChanged.satisfied(BuildIfChanged.java:12)
        at com.pmease.quickbuild.model.Configuration.isBuildNecessary(Configuration.java:1490)
        at com.pmease.quickbuild.CheckConditionJob.execute(CheckConditionJob.java:39)
        at com.pmease.quickbuild.grid.GridJob.run(GridJob.java:106)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
2015-12-17 15:49:49,419 [pool-1-thread-10662] INFO com.pmease.quickbuild.DefaultBuildEngine - Build condition not satisfied, new build won't be generated.
2015-12-17 15:49:49,419 [pool-1-thread-10662] INFO com.pmease.quickbuild.DefaultBuildEngine - Build request has been processed.
2015-12-17 15:49:49,426 [pool-1-thread-10657] INFO com.pmease.quickbuild.DefaultBuildEngine - Processing build request (configuration:root/castanet/castanet/pull-requests, request id:8e48b379-ede9-408c-ad16-ba9acd246f5b)
2015-12-17 15:49:49,433 [pool-1-thread-10657] INFO com.pmease.quickbuild.DefaultBuildEngine - Checking build condition on node (address: quickbuild:8810, ip: 192.168.100.13)...
2015-12-17 15:49:49,437 [pool-1-thread-10662] INFO com.pmease.quickbuild.CheckConditionJob - Taking repository snapshots...
2015-12-17 15:49:49,443 [pool-1-thread-10662] INFO com.pmease.quickbuild.repositorysupport.Repository - Taking snapshot of repository 'git-repo'...
2015-12-17 15:49:49,443 [pool-1-thread-10662] INFO com.pmease.quickbuild.repositorysupport.Repository - Determining head revision for repository: git-repo
2015-12-17 15:49:50,832 [pool-1-thread-10662] INFO com.pmease.quickbuild.CheckConditionJob - Evaluating build condition...
2015-12-17 15:49:50,848 [pool-1-thread-10662] INFO com.pmease.quickbuild.repositorysupport.Repository - Getting changes of 'git-repo' since build '4.5.6.dev5774'...
2015-12-17 15:49:50,956 [pool-1-thread-10657] INFO com.pmease.quickbuild.DefaultBuildEngine - Build condition not satisfied, new build won't be generated.
2015-12-17 15:49:50,957 [pool-1-thread-10657] INFO com.pmease.quickbuild.DefaultBuildEngine - Build request has been processed.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [18/Dec/15 12:59 AM]
Can you please tell me the exact steps to reproduce this issue with GitHub (we do not have GitHub enterprise)?

John Szakmeister [18/Dec/15 07:48 PM]
I imagine it will reproduce the same with GitHub too. Basically, create a branch, add a commit, push it up and create a pull request. Then, amend the commit (with "git commit --amend") and force push the branch ("git push -f"). I don't think the traceback above is necessarily the problem, because I see similar ones when it's successful after a rebase. But there's something else going on and it never does the build. I haven't quite managed to get to the point where I can say the above is a concrete reproduction recipe, but it's happened to us several times in the last week with that kind of scenario.

Robin Shen [19/Dec/15 11:18 AM]
Thanks for the info. Will get this solved in next big QB release which will be available at end of this month together with many other improvements.