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

Bug 402817

Summary: sftp doesn't report progress or errors
Product: [ECD] Orion Reporter: Rafael Chaves <eclipse>
Component: ServerAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, libingw, mamacdon, Mike_Wilson
Version: 2.0Flags: libingw: review+
Target Milestone: 3.0 RC2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Rafael Chaves CLA 2013-03-09 12:17:27 EST
Seeing this on OrionHub today: SFTP export/import do not report progress or failure - you can only see a message appear in the notification area for an instant but too fast to be actually read. 

I can only tell whether the operation succeeded/failed by checking the contents of the destination (local or remote).
Comment 1 Mark Macdonald CLA 2013-06-11 13:27:04 EDT
I did some debugging, and there are both client and server problems here.

On the client, we were not doing the required handling to monitor the long-running SFTP export/import operation. 

On the server, when the SFTP export/import job is started (via POST /xfer/{export,import}/whatever), it returns a URL pointing to a nonexistent operation. When the client tries to retrieve the operation, it 404s. This needs to be fixed before the client-side code will work.

I'm hesitant to fix the client side without the server fix in place, because when the 404 error surfaces in the UI, it gives the impression that the SFTP task failed (when in reality, it is running behind the scenes). This is actually more misleading than having no feedback at all.
Comment 3 Mark Macdonald CLA 2013-06-12 10:54:15 EDT
Had to revert the change to operations.js because it caused problems with Git operations (see bug 410598). Unfortunately that means the SFTP export/import will, again, not provide any visible progress.

In the case of SFTP, a successful operation resolves to a Status with no additional info (i.e. no JsonData field). The operation handling code on the client only returns the JsonData as the final result of a successful operation, so we have nothing to show in the UI.
Comment 4 Mark Macdonald CLA 2013-06-12 11:44:13 EDT
Allowed the caller of operation.handle() to provide custom handling of a successful operation. fileImpl uses this API to return the Status object as the result of SFTP export/import operations. The Status is then shown in the UI.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=40f8705