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

Bug 435308

Summary: Migrate EMO content to Gerrit
Product: Community Reporter: Christopher Guindon <chris.guindon>
Component: WebsiteAssignee: phoenix.ui <phoenix.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: anne.jacko, denis.roy, edouard, ian.skerrett, mike.milinkovich, sharon.corbett, thanh.ha
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Christopher Guindon CLA 2014-05-20 11:36:33 EDT
Here's a list of repo that I would like to be able to force push my solstice feature branch to the staging branch. 

- articles
- artwork
- committers
- community
- corporate_sponsors
- donate
- downloads
- eclipse.org-common
- eclipse4
- friends
- home
- ide
- membership
- org
- projects
- resources
- users
Comment 1 Thanh Ha CLA 2014-05-20 13:04:56 EDT
This is fixed for these projects, all I had to do was set the permissions parent to the permissions/www-auth project (inherited).

- downloads
- eclipse.org-common
- home
- ide
- membership
- projects



The remaining ones I can't do because they are not Gerrit projects. Who do I need to get a +1 from to migrate all of these repos to Gerrit?

List:

- articles
- artwork
- committers
- community
- corporate_sponsors
- donate
- eclipse4
- friends
- org
- resources
- users
Comment 2 Christopher Guindon CLA 2014-05-20 13:06:48 EDT
> 
> The remaining ones I can't do because they are not Gerrit projects. Who do I
> need to get a +1 from to migrate all of these repos to Gerrit?
> 
> List:
> 
> - articles
> - artwork
> - committers
> - community
> - corporate_sponsors
> - donate
> - eclipse4
> - friends
> - org
> - resources
> - users

+1 from me but I think we need a +1 from Denis before moving forward with this.
Comment 3 Denis Roy CLA 2014-05-20 13:37:59 EDT
+1
Comment 4 Thanh Ha CLA 2014-05-20 13:49:33 EDT
I migrated the listed websites and assigned the www-auth permissions.
Comment 5 Denis Roy CLA 2014-06-20 14:16:04 EDT
(In reply to Christopher Guindon from comment #2)
> > - articles
> > - artwork
> > - committers
> > - community
> > - corporate_sponsors
> > - donate
> > - eclipse4
> > - friends
> > - org
> > - resources
> > - users

Let's map out the other repos that are maintained by Foundation staff, either migrate them to Gerrit and provide some training, or revert them to plain Git.
Comment 6 Mike Milinkovich CLA 2014-06-20 14:39:33 EDT
I edit my web pages (primarily legal and org) via an Orion instance running on localhost.

Can someone help me understand what my workflow will become? Does this mean that after I commit the code from Orion that I will need to also interact with Gerrit?
Comment 7 Edouard Poitras CLA 2014-06-20 14:40:41 EDT
(In reply to Denis Roy from comment #5)
> (In reply to Christopher Guindon from comment #2)
> > > - articles
> > > - artwork
> > > - committers
> > > - community
> > > - corporate_sponsors
> > > - donate
> > > - eclipse4
> > > - friends
> > > - org
> > > - resources
> > > - users
> 
> Let's map out the other repos that are maintained by Foundation staff,
> either migrate them to Gerrit and provide some training, or revert them to
> plain Git.

According to https://docs.google.com/spreadsheet/ccc?key=0AsQLOtRdqwM9dHBEcGdUYVU3WmFTQXpySGNUNG9xX3c&usp=drive_web#gid=0

10years                                                                         
arch                                                                            
articles                                                                        
artwork                                                                         
callisto                                                                        
committers                                                                      
community                                                                       
contribute                                                                      
corporate_sponsors                                                              
documentation                                                                   
donate                                                                          
downloads                                                                       
eclipse.org-common                                                              
eclipse4                                                                        
errors                                                                          
europa                                                                          
galileo                                                                         
ganymede                                                                        
go                                                                              
home                                                                            
images                                                                          
indigo                                                                          
juno                                                                            
kepler                                                                          
legal                                                                           
licenses                                                                        
luna                                                                            
mail                                                                            
membership                                                                      
mobile                                                                          
mpc                                                                             
newsgroups                                                                      
org                                                                             
phoenix-test                                                                    
projects                                                                        
resources                                                                       
screenshots                                                                     
users
Comment 8 Edouard Poitras CLA 2014-06-20 14:46:06 EDT
(In reply to Mike Milinkovich from comment #6)
> I edit my web pages (primarily legal and org) via an Orion instance running
> on localhost.
> 
> Can someone help me understand what my workflow will become? Does this mean
> that after I commit the code from Orion that I will need to also interact
> with Gerrit?

If you want simply change the git URL to the gerrit one, you don't need to do anything differently (gerrit won't force you to use it's review system - it'll just push things right through to the git repo).

If you want to use the review system you just have to push to the /refs/for/branch_name branch instead of the typical branch_name.

I don't use Orion, but in command line it would look something like this:
# Switch from Git to Gerrit remote origin
git remote rm origin
git remote add origin ssh://gerrit url here
# Push directly to master branch on git repo:
git push origin master # The usual
# Push to gerrit in order to review a push to master:
git push origin HEAD:/refs/for/master
# Once it's reviewed and pushed in the Gerrit UI, it'll appear in the git repo in the master branch.

Hope that helps.
Comment 9 Ian Skerrett CLA 2014-06-20 16:26:05 EDT
(In reply to Mike Milinkovich from comment #6)
> I edit my web pages (primarily legal and org) via an Orion instance running
> on localhost.
> 
> Can someone help me understand what my workflow will become? Does this mean
> that after I commit the code from Orion that I will need to also interact
> with Gerrit?

+1 is there documentation on how to use Gerrit that someone can point to?
Comment 10 Christopher Guindon CLA 2014-06-23 09:56:18 EDT
(In reply to Ian Skerrett from comment #9)
> (In reply to Mike Milinkovich from comment #6)
> > I edit my web pages (primarily legal and org) via an Orion instance running
> > on localhost.
> > 
> > Can someone help me understand what my workflow will become? Does this mean
> > that after I commit the code from Orion that I will need to also interact
> > with Gerrit?
> 
> +1 is there documentation on how to use Gerrit that someone can point to?

Denis wrote a good blog post about Gerrit:

http://eclipsewebmaster.blogspot.ca/2013/11/using-gerrit-code-review-without-code.html

There also the Eclipse wiki page for Gerrit that you could take a look at:

https://wiki.eclipse.org/Gerrit
Comment 11 Mike Milinkovich CLA 2014-06-23 09:59:42 EDT
Guys, 

I do appreciate all the pointers. But I simply do not have time to go read stuff and figure it out. Please pretend I am an utter moron (that won't be hard) and spoon feed me _exactly_ what I need to do.
Comment 12 Christopher Guindon CLA 2014-06-23 10:40:57 EDT
(In reply to Mike Milinkovich from comment #11)
> Guys, 
> 
> I do appreciate all the pointers. But I simply do not have time to go read
> stuff and figure it out. Please pretend I am an utter moron (that won't be
> hard) and spoon feed me _exactly_ what I need to do.

First, you need to link your public ssh key with Gerrit and update your remote url. After this initial setup, you should be able to push to git/gerrit the same way you where doing it before.

1. Sign in to Gerrit:
https://git.eclipse.org/r/login/q/status:open,n,z

2. Copy your public SSH key:
https://git.eclipse.org/r/#/settings/ssh-keys

3. Update remote URLS:
You need to find the project on Gerrit web ui https://git.eclipse.org/r/

If the project is missing, it's because it's not setup to use Gerrit. You will need to use the urls from cgit https://git.eclipse.org/c/

3.1 Search for the project. (This page is also available from the Projects link in the main menu of Gerrit web ui): https://git.eclipse.org/r/#/admin/projects/

To filter out non www.eclipse.org repo, start with typing www.eclipse.org in the filter box.

3.2 Click on www.eclipse.org/org

3.3 Click on SSH for the Gerrit remote URL. If you need to update an existing repo, please ignore "git clone" and only copy ssh://...

4. Update remote url:
You can do this with the command line.

git remote set-url origin ssh://git.eclipse.org:29418/www.eclipse.org/org

You can also update the remote url with eclipse git perspective. 

Mike, I can definitely help you with this today if you have a few minutes for me.
Comment 13 Christopher Guindon CLA 2014-06-23 11:31:17 EDT
Denis, is it possible for us to automatically create a redirect for old git urls to the new Gerrit urls when we migrate a repo to Gerrit?

Updating a remote url is the most annoying step when a user needs to migrate to Gerrit for the first time.
Comment 14 Denis Roy CLA 2014-06-23 11:35:10 EDT
No, SSH URLs cannot be redirected.  That would be a man-in-the-middle attack  :)

Gerrit also uses a different host key, and it also uses different https passwords.
Comment 15 Thanh Ha CLA 2014-06-23 14:29:14 EDT
(In reply to Mike Milinkovich from comment #6)
> Can someone help me understand what my workflow will become? Does this mean
> that after I commit the code from Orion that I will need to also interact
> with Gerrit?

Hi Mike,

Your workflow does not change, the only thing that changes is that URLs you use to push/pull so you will need to update existing repo URLs you are working on.

In Orion you can change this by going to the "Git repo view -> Configuration -> remote.origin.url" and setting it to the URL that Gerrit gives you for the repo.

Once that's configured...

If you use "https" to connect then Gerrit does not allow you to use your eclipse.org password, Gerrit will generate you a random password which you need to use. You can find this in Gerrit at this URL after you login https://git.eclipse.org/r/#/settings/http-password

If you use "ssh" to connect you will need to add your public SSH key to this URL https://git.eclipse.org/r/#/settings/ssh-keys


I think the key thing to keep in mind in the immediate future is that you can ignore the fact that Gerrit's running in the backend and use it as you were using Git before, only the URLs you use to push / pull is different. In the longer term we can setup a demo for everyone on how to use Gerrit specific features but this isn't mandatory for using Gerrit.
Comment 16 Mike Milinkovich CLA 2014-06-24 11:20:46 EDT
Thanks for all the help Thanh and Eddie. I'm up and running on Gerrit now. (At least for the repos I use that have switched.)
Comment 17 Thanh Ha CLA 2014-06-27 11:31:40 EDT
(In reply to Edouard Poitras from comment #7)

Now that Luna's been released we should look into enabling Gerrit for the remaining repos from Eddie's list in comment 7. I can look into doing this, this afternoon if there is no objections.
Comment 18 Thanh Ha CLA 2014-06-27 11:40:36 EDT
(In reply to Edouard Poitras from comment #7)

Now that Luna's been released we should look into enabling Gerrit for the remaining repos from Eddie's list in comment 7. I can look into doing this, this afternoon if there is no objections.
Comment 19 Denis Roy CLA 2014-06-27 13:26:14 EDT
Doesn't matter to me, as long as we can identify who commits there, as well as help them update their remotes.
Comment 20 Thanh Ha CLA 2014-06-27 13:55:22 EDT
10years         : Chris
arch            : Denis
callisto        : Nathan / Matt / Wayne
contribute      : Chris / Wayne
documentation   : Matt / Denis / Wayne
errors          : Denis
europa          :
galileo         :
ganymede        :
go              : Denis
images          : Mike / Denis / Wayne / Chris / Andrew / Anne
indigo          : Wayne / Chris / David Williams
juno            : Chris
kepler          : Chris
legal           : Chris / Mike / Sharon / Ian / Matt / Wayne
licenses        : Mike / Denis
luna            : Chris / Wayne / Chris Aniszczyk
mail            : Denis / Wayne / Matt / Chris
mobile          : Chris
mpc             : Ian / Carsten Reckord
newsgroups      : Denis / Matt
phoenix-test    : Denis
screenshots     : Wayne


Notes:

phoenix-test only has a single commit stating that it's a test commit. Do we even need this repo? is it worth even keeping around?


I think the 2 repos that we may need to help people setup are "images" and "legal". The other repos seem to be only committers who are all part of the technical team.


Also MPC is a project, does this really count as EMO? But I guess it only affects Carsten and Ian so maybe we can open a bug and ask if they want MPC to be Gerrit enabled.
Comment 21 Christopher Guindon CLA 2014-06-27 13:58:09 EDT
> Notes:
> 
> phoenix-test only has a single commit stating that it's a test commit. Do we
> even need this repo? is it worth even keeping around?
> 

I have a bug for this, Bug 433038 - Remove /phoenix-test/ from production
Comment 22 Thanh Ha CLA 2014-06-27 15:36:44 EDT
(In reply to Thanh Ha from comment #20)

I've enabled Gerrit on all the repos listed in comment 20 except for:

    - mpc
    - phoenix-test


Ian, I think you're the Project Lead for MPC. Let me know if you think it makes sense for us to enable Gerrit for MPC.


Also, If anyone needs help updating your Git setup to use the Gerrit URLs feel free to contact me and I can walk you through the process.
Comment 23 Anne Jacko CLA 2014-06-30 11:10:44 EDT
(In reply to Thanh Ha from comment #22)

> Also, If anyone needs help updating your Git setup to use the Gerrit URLs
> feel free to contact me and I can walk you through the process.

Thanh, I haven't been able to do anything in the foundation or community repos since the change to Gerrit. I'm pretty sure you can fix that in about five minutes when we see each other in Ottawa nest week. So let's plan on that.
Comment 24 Thanh Ha CLA 2014-07-14 10:51:55 EDT
(In reply to Anne Jacko from comment #23)
> Thanh, I haven't been able to do anything in the foundation or community
> repos since the change to Gerrit. I'm pretty sure you can fix that in about
> five minutes when we see each other in Ottawa nest week. So let's plan on
> that.

I helped Anne with this when she was in Ottawa last week.


I think we're done here. Is there anything left to do? or can we close this?
Comment 25 Denis Roy CLA 2014-07-14 13:36:59 EDT
> I think we're done here. Is there anything left to do? or can we close this?

Is everyone identified in comment 20 up-to-date with references to Gerrit?
Comment 26 Sharon Corbett CLA 2014-07-14 13:51:05 EDT
(In reply to Denis Roy from comment #25)
> > I think we're done here. Is there anything left to do? or can we close this?
> 
> Is everyone identified in comment 20 up-to-date with references to Gerrit?

I'm not but that is completely my fault.  Not enough time to take Thanh up on his kind offer.

I need to reinstall Eclipse again, etc., etc.

Oddly enough I have some kind friends in high places that don't mind posting a change here or there for me the odd time I need one made.

Regards,
Sharon
Comment 27 Denis Roy CLA 2015-08-19 16:05:19 EDT
I think we've done everything we could here.