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

Bug 443808

Summary: [server][git] Expose the response message of the git server on push
Product: [ECD] Orion Reporter: Lidor Tal <lidortal>
Component: ServerAssignee: Project Inbox <orion.server-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: matthias.sohn, michael.ochmann
Version: unspecified   
Target Milestone: 7.0   
Hardware: All   
OS: All   
Whiteboard:

Description Lidor Tal CLA 2014-09-11 06:21:05 EDT
Currently the Orion backend does not expose the response message of the git server to the UI frontend when performing push operation.
Comment 1 Michael Ochmann CLA 2014-10-06 11:21:17 EDT
Proposed a patch to Gerrit:
https://git.eclipse.org/r/#/c/34460

For maximum compatibility I chose to deliver the message returned from the git server in the "DetailedMessage" attribute of the response. 

Example with a detail message from a Gerrit server:

{
  "Location": "/task/id/EMr7rmVNABQQAdFXjLxe_w",
  "Result": {
    "BundleId": "unknown",
    "Code": 0,
    "DetailedMessage": "\r
      Processing changes: updated: 1, refs: 1\r
      Processing changes: updated: 1, refs: 1, done    \n\n
      Updated Changes:\n
        https://git.example.org/3762\n\n",
    "HttpCode": 200,
    "Message": "OK",
    "Severity": "Ok"
  },
  ...
}

Alternatively one could think of returning the message as "JsonData" attribute (i.e. returning a ServerStatus instead of a simple Status from PushJob), but I think "DetailedMessage" is more appropriate in this case.
Comment 2 Matthias Sohn CLA 2014-10-10 09:18:31 EDT
merged as 6f4a7d2c141faecaa27d4dafeb4021c138769070