cancel
Showing results for 
Search instead for 
Did you mean: 

Gerrit Code Review pane not working in WebIDE?

mhabe
Discoverer
0 Kudos

Hi!

For me, the Gerrit Code Review pane just does not work.

After the initial load it shows 0 changes for all three tabs (which is wrong).
If i clicking the refresh button the tabs become inactive and it displays: "Not a Gerrit project".

At first, the following error was shown in the console:

  • 3:30:39 PM (ide) Gerrit service- don't have all the params- missing remote value

I added the property remote.origin.hcpdestination as mentioned in this answer.
After doing so, the error is gone, now the console is spammed by the following errors:

  • 3:38:14 PM (ide) Gerrit service doesn't have a Git host in the destination config
  • 3:38:14 PM (ide) Gerrit service- func isGerritProject- don't have all the params- missing Project Name

However, I am able to fetch changes from gerrit and commits are showing up in gerrit as I expect them to.

Is there some configuration i missed or does this relate to a bug in the WebIDE?

It would be great if somebody could push me into the right direction!

Best,

Martin

Accepted Solutions (1)

Accepted Solutions (1)

mhabe
Discoverer
0 Kudos

Hello Rima,

thank you for your help, i finally managed to solve it!
I found the details explained within the sap help portal - however it was really hard to track down as it is not related to gerrit at all.
Basically i needed to configure gerrit as a destination to make it work.

In case somebody else has the same problem, this is how i solved it:

Solution:

At first, you need to configure gerrit as destination in your SCP Cockpit, please refer to one of the following:

It as all about the Additional Properties!
The property "WebIDEAdditionalData" needs to get prefixed with git_host_, this is not a typo!
my-gitserver.com becomes git_host_my-gitserver.com.

I needed to set the WebIDEUsage Property to "git_on_premise"

When you have done this, you just go ahead and clone your repository from gerrit.
In the clone dialog, mark the checkbox labeled "Add configuration for Gerrit".

That's it, no need to add any additional details to the git config - it is just working. 🙂

Best,
Martin

Answers (1)

Answers (1)

rima-sirich
Advisor
Advisor
0 Kudos

Hi Martin,

I just checked Web IDE Gerrit integration and it worked for me.

1. Regarding the error: "Gerrit service doesn't have a Git host in the destination config"

"remote.origin.hcpdestination" property should contain the name of the destination used for the communication with gerrit. This destination should have an additional property

"WebIDEAdditionalData" : git_host_git.wdf.sap.corp ( in your case replace git.wdf.sap.corp with your gerrit url. it should be the same host used in URL destination property. ) Note that after destination was updated it will take 5-10 minutes until the change will be reflected in Web IDE.

2. Regarding the error: "Gerrit service- func isGerritProject- don't have all the params- missing Project Name"

Project name is calculated from "remote.origin.url". This property should be defined in the same place you added "remote.origin.hcpdestination" property. It should have the following format:

"remote.origin.url" : https://<your user>@git.wdf.sap.corp/<your project name>

Hope it helps.

Regards,

Rima