Jump to content

Talk:Gerrit/Tutorial/Archive 2

About this board

Consider droping the use of git review from the tutorial?

1
Abbe98 (talkcontribs)

A notable portion of this tutorial is dedicated to "git-review", however, for the purpose of this tutorial all it does is:

  1. installs a regular git hook
  2. hides a regular git push command

Wouldn't it be better to explain how Gerrit works with those native git features rather than using a tool which will be new to many? As an added benefit the tutorial will work in all environments and shells where git works.

Reply to "Consider droping the use of git review from the tutorial?"

Dockerfile ADD command

3
Alex Mashin (talkcontribs)

Can a repository at gerrit.wikimedia.org be used in an ADD command in a Dockerfile?
Alexander Mashin talk 14:48, 15 October 2023 (UTC)

Tacsipacsi (talkcontribs)
Alex Mashin (talkcontribs)
Reply to "Dockerfile ADD command"

Help:Create a Wikimedia developer account

2
Tacsipacsi (talkcontribs)
Taavi (talkcontribs)

Fixed, thanks.

Reply to "Help:Create a Wikimedia developer account"
Lectrician1 (talkcontribs)

@AKlapper (WMF) I've change this page to just describe how to use Git to interact with Gerrit. It doesn't describe anything else about Gerrit. That has been moved to other pages such as Gerrit/Web tutorial.

AKlapper (WMF) (talkcontribs)

@Lectrician1 ...which makes it Gerrit specific, due to URLs like "gerrit.wikimedia.org", and due to workflows like "git review".

Lectrician1 (talkcontribs)

Okay, but by naming this the main "Gerrit tutorial" it makes it seem as if Git is the only way you use Gerrit. You can also use Gerrit using the web interface. That's why I suggested changing it to "Git tutorial" to differentiate it.

AKlapper (WMF) (talkcontribs)

Git is the only way to use Gerrit (on a server) as Gerrit does not work without Git repositories behind it, but I assume you refer to installing a Git client on your machine from a user perspective, indeed. The problem is that there are several meanings here, I'm afraid... :-/ And I do not think that many folks use the (quite non-intuitive) web interface, so using git is the more common way I'd think. See also previous discussion and feedback in Topic:X9mxl87i9na7ppu9.

Lectrician1 (talkcontribs)

I think people do use the web interface and it is easy to use. I personally used the web interface to make my first changes because I could get setting up SSH keys to work. It was very challenging. Just recently on the MediaWiki Discord server I saw someone not be able to set up SSH keys and they used the web interface instead. That's why I think it's important to show users that the web interface is an available option for them to use.

AKlapper (WMF) (talkcontribs)

The web interface is a nice alternative, indeed.

Reply to "Git Gerrit tutorial"

Simplifying or replacing the Gerrit setup for being a blocker to new developers

5
Prototyperspective (talkcontribs)

The Gerrit setup process seems to be the main blocker inhibiting newcomers to help with development (once they managed to actively reach this page).

Are there any ongoing projects or issues or debate about either simplifying the process or replacing it?

For example by just using Visual Studio Code and git without Gerrit and/or a GUI that takes the user through a simple step-by-step process to download, install and configure everything that's needed? Using that GUI would not require technical expertise or much time and it would automatically solve/prevent any problems. It (e.g. a Qt one) could also get developed further to also set up other things needed for various WP development projects like the MediaWiki docker container etc. (note that it needs to internally do things like comparing hashsums which it could display)

I think the Gerrit requirements are the or one of the major technical(!) bottlenecks that cause the lack of developers (even though the technical aspects are not even half of the problem). If this hasn't been discussed so far which would be the best places to propose this?

AKlapper (WMF) (talkcontribs)
Prototyperspective (talkcontribs)

Thanks, yes it only seems to be the main blocker to me. Other obstacles once they managed to actively reach this page(!) are probably further down so less inhibitive because by then they already got started developing. GitLab would make things much easier (a GUI could be still be useful for the same reasons once GitLab is being used).

MarMi wiki (talkcontribs)

There should also be (shorter?) tutorial for people that don't want to install anything (want to edit by web, if it's possible).

And alternative way to request for smaller changes (why do I need to create an account to propose a change that has only few lines?).

AKlapper (WMF) (talkcontribs)
Reply to "Simplifying or replacing the Gerrit setup for being a blocker to new developers"

Branch seemed to have changed from master to main

5
Eugene233 (talkcontribs)

After cloning a repository, I realized that the remote branch changed to main. This however is not reflected in this documentation (Gerrit tutorial). Could this be modified now or should one created a Phabricator ticket for this modification.

AKlapper (WMF) (talkcontribs)

Hi, which "a repository" is this about?

BDavis (WMF) (talkcontribs)
Eugene233 (talkcontribs)

@AKlapper (WMF) I was cloning the commons-recon-service from gerrit. I just noticed that the gerrit tutorial still makes use of the origin master which I was thinking should be origin main(not so sure I had to change to reflect the changes in the origin branch name).


For example in Gerrit/Tutorial#Create a branch changing git checkout -b BRANCHNAME origin/master

to git checkout -b BRANCHNAME origin/main


@BDavis (WMF) Thanks a lot for pointing out the inclusive language page.

AKlapper (WMF) (talkcontribs)
Reply to "Branch seemed to have changed from master to main"
আফতাবুজ্জামান (talkcontribs)

@AKlapper (WMF) I think Gerrit/Tutorial#Editing via the web-interface section needs updating.

8. "Under "Files", click the "Edit" button", if i'm not wrong it should be "In the upper right corner, click the "Edit" button".

9. "Under "Files", click "Add", there is no "add" button but ADD/OPEN/UPLOAD button.

AKlapper (WMF) (talkcontribs)
Reply to "Update"

Got an error while trying to clont pywikibot

2
PythonSwarm (talkcontribs)

git clone ssh://nullpointerexception@gerrit.wikimedia.org:29418/pywikibot/core

Cloning into 'core'...

Connection to gerrit.wikimedia.org closed by remote host.

fatal: the remote end hung up upon initial contact

This happened with all other Gerrit stuff, and cloning from Phabricator and Github is fine.

AKlapper (WMF) (talkcontribs)
Reply to "Got an error while trying to clont pywikibot"

Forgot to branch master and then committed to gerrit

3
Summary by Tinss

Change the topic flag within gerrit's web UI.

Tinss (talkcontribs)

I absentmindedly forgot to branch master and then committed my change to gerrit. I know it's not the way things are supposed to be done, but do I need to abandon my change on gerrit and redo it?

Samwilson (talkcontribs)

You could rename the current branch (git branch -m new-name) and then review as normal. Or you could use the -t flag for git-review, and explicitly set the topic (git review -t new-name). I normally do the former in that situation. If later you do want a local master branch, you can just create it then (git checkout -b master gerrit/master).

Or there's probably another more correct way that I'm forgetting. :-) That's usually the case with Git.

Oh, sorry, I just realised: do you mean you've already pushed the change for review? In that case the topic flag is the way to go I think, or you can just change the topic via the web UI.

Tinss (talkcontribs)

Yes it's been pushed for review. I've set the topic flag in gerrit. Thanks!

"Network unreachable" message when making ssh connection to Gerrit

6
Asrajmane193 (talkcontribs)

Hello, I have started with the initial set up. I have everything upto adding ssh key to use with git.

I am running the command to make ssh connection to Gerrit: ssh asrajmane193@gerrit.wikimedia.org -p 29418

It gives me the message "ssh: connect to host gerrit.wikimedia.org port 29418: Network is unreachable". I tried changing the port to some random number, 29000. Still no luck.

I am fairly new here. Please help.

Florianschmidtwelzow (talkcontribs)

Can you try to ping gerrit.wikimedia.org? What is the result? (i assume you're using a linux distro?)

Xqt (talkcontribs)

29418 is the right port. Maybe it is blocked by a local router or firewall?

Shrutika719 (talkcontribs)

Is this problem resolved? Because I am still facing this problem, I tried switching the ports but all in vain

Darthbhyrava (talkcontribs)

I am facing a similar problem. I think it's the proxy. But even after I installed corkscrew, shifted the installed binary to /bin and made appropriate changes to .ssh/config, I get the same error.

The ping to gerrit is fine, btw.

Any leads?

Edit: Resolved.

There was an error in the path to my corkscrew binary in .ssh/config. I corrected it, added my public keys to gerrit, and it worked. :)

This post was hidden by AKlapper (WMF) (history)