Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 386948

Summary: "stuck" progress spinner when switching branches
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: GitAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, maciej.bendkowski, malgorzata.tomczyk, Szymon.Brandys
Version: 0.5Flags: malgorzata.tomczyk: review? (ken_walker)
Szymon.Brandys: review? (Szymon.Brandys)
Target Milestone: 1.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
screenshot...branch has switched but repo is spinning none

Description Susan McCourt CLA 2012-08-09 12:38:06 EDT
Created attachment 219720 [details]
screenshot...branch has switched but repo is spinning

Running from HEAD...
- I opened repository page for my org.eclipse.orion.client clone.
- wanted to switch back to a topic branch, it was not in the list so I click "View All Branches"
- checkout my topic branch
- the branch change appears to have worked but I have a spinning progress indicator on the repo.  
- there are also errors in the console.

I am running from HEAD so it's possible I have client/server mismatch????
Comment 1 Susan McCourt CLA 2012-08-09 12:42:13 EDT
It could be that it's unrelated to progress, in which case we just need to make sure progress stops if there's an error rather than spin forever.

Console errors are:

Failed to load resource: the server responded with a status of 400 (Bad Request) http://susan.orion.eclipse.org:8080/gitapi/clone/file/Gm/
Error
arguments: undefined
get stack: function () { [native code] }
message: "Unable to load /gitapi/clone/file/Gm/ status:400"
responseText: "{"JsonData":{"Scheme":"ssh","HostKey":"AAAAB3NzaC1yc2EAAAABIwAAAIEAuKF3Ly38celFqKvVs1nAikEnNHxfW/nvg5mE/nOJQJNWMcNX/yxsr3pxfYWW5EVVDQ+SYUtpJjP36m04jaai/nHBuJTa4diubdzYM/wA4ZMf0zef2LqY/+aE6o3TGbKR3N181pXRBfKeOm92Vig4pLINoV3Im0ebblz6HDDrNtE=","Host":"git.eclipse.org","KeyType":"ssh-rsa","User":"sfranklin","HumanishName":"org.eclipse.orion.client","HostFingerprint":"68:d8:ed:a9:c2:d8:7b:b8:90:56:0c:9e:d9:8a:17:6c","Url":"ssh://sfranklin@git.eclipse.org/gitroot/orion/org.eclipse.orion.client.git"},"HttpCode":400,"DetailedMessage":"The authenticity of host git.eclipse.org can't be established","Message":"The authenticity of host git.eclipse.org can't be established","Severity":"Error","Code":0}"
set stack: function () { [native code] }
status: 400
type: undefined
__proto__: SetUpError.d
 :8080/org.dojotoolkit/dojo/_base/xhr.js:609
_deferError :8080/org.dojotoolkit/dojo/_base/xhr.js:609
4
Error
arguments: undefined
get stack: function () { [native code] }
message: "Unable to load /gitapi/clone/file/Gm/ status:400"
responseText: "{"JsonData":{"Scheme":"ssh","HostKey":"AAAAB3NzaC1yc2EAAAABIwAAAIEAuKF3Ly38celFqKvVs1nAikEnNHxfW/nvg5mE/nOJQJNWMcNX/yxsr3pxfYWW5EVVDQ+SYUtpJjP36m04jaai/nHBuJTa4diubdzYM/wA4ZMf0zef2LqY/+aE6o3TGbKR3N181pXRBfKeOm92Vig4pLINoV3Im0ebblz6HDDrNtE=","Host":"git.eclipse.org","KeyType":"ssh-rsa","User":"sfranklin","HumanishName":"org.eclipse.orion.client","HostFingerprint":"68:d8:ed:a9:c2:d8:7b:b8:90:56:0c:9e:d9:8a:17:6c","Url":"ssh://sfranklin@git.eclipse.org/gitroot/orion/org.eclipse.orion.client.git"},"HttpCode":400,"DetailedMessage":"The authenticity of host git.eclipse.org can't be established","Message":"The authenticity of host git.eclipse.org can't be established","Severity":"Error","Code":0}"
set stack: function () { [native code] }
status: 400
type: undefined
__proto__: SetUpError.d
 :8080/org.dojotoolkit/dojo/_base/Deferred.js:258
dojo.Deferred.reject.errback
Comment 2 Susan McCourt CLA 2012-08-09 12:49:02 EDT
After the first steps, I rebased my topic branch.  
Got the operations spinner, an OK message, etc. but the repo is still spinning
Comment 3 Maciej Bendkowski CLA 2012-08-10 07:04:58 EDT
I find it quite difficult to reproduce this bug. It seems to me, that at some point the deferred errback is not called and thus the spinner is never stopped.
Comment 4 Malgorzata Janczarska CLA 2012-08-10 07:24:52 EDT
The errors you attached are from the git authentication, they usually trigger the question about unknown host, but may also report other error about authentication. I'm not sure if they exactly triggered the spinner problem. I think there is a problem on repositories page that is being swallowed, I noticed similar problems while rendering sections. Sometimes rendering list of branches stops at second, third branch, doesn't report any errors and doesn't turn the blinking dots off. I'll try to debug for that.
Comment 5 Malgorzata Janczarska CLA 2012-08-10 10:47:27 EDT
There may be two possibilities that caused this problem:
1. one of the requests Maciek has made to obtain the repository details never called errback or a callback
2. there was an error in one of the callback functions that was  that was not reported on the console because it was swallowed by the defferred.

The first case would be probably reported in the console. Errors Susan attached don't come from any of the requests made to get repository details. For the second case I added error handling in places where some unexpected problems may occur.

This is the commit number: 7362153234468538a5d6dda45ade410bb34f1fc7, it's pushed to branch Bug386948.
Ken, please review. If you don't wan't to commit this into M1 please postpone the bug to M2.
Comment 6 Ken Walker CLA 2012-08-10 11:09:29 EDT
Given this is not a simple change and that the defect is not really blocking I'm deferring this to M2.
Comment 7 Malgorzata Janczarska CLA 2012-08-16 11:35:41 EDT
Pushed. Progress should not be stuck now and if there is an error we should have information about it in logs.