This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 361707 - I have broken the platform-ui git repository
Summary: I have broken the platform-ui git repository
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Git (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-21 16:31 EDT by Brian de Alwis CLA
Modified: 2013-07-07 22:22 EDT (History)
18 users (show)

See Also:


Attachments
Remy's .git/packed-refs (158.29 KB, text/plain)
2011-10-21 17:01 EDT, Remy Suen CLA
no flags Details
git show-ref (164.83 KB, text/plain)
2011-10-23 09:59 EDT, Markus Keller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2011-10-21 16:31:50 EDT
I'm very sorry, but I just pushed some commits to git://bdealwis@git.eclipse.org/gitroot/platform/eclipse.platform.ui.git) using bzr-git (which I've done previously with no issue), and somehow wiped out all the branches but two: master and R4_development (which I was pushing to).  

It would appear that I've somehow broken the repository too as Remy can't commit to the repository.

Help!
Comment 1 Remy Suen CLA 2011-10-21 16:40:44 EDT
(In reply to comment #0)
> It would appear that I've somehow broken the repository too as Remy can't
> commit to the repository.

I've pushed some branches back, but they won't let me push some other ones because of the commit hook that prevents me from pushing stuff of another committer.

error: git.eclipse.org does not know this committer,
 or this
this committer cannot commit to this project (gid=8786
repo:eclipse.platform.ui): platform-releng-dev@eclipse.org.
error:
git.eclipse.org does not know this committer,
 or this this committer
cannot commit to this project (gid=8786 repo:eclipse.platform.ui):
sxenos.
denied: You (remysuen@ca.ibm.com) cannot push changes that were
not committed by you or members of your project. Please fix your
repository, and see http://wiki.eclipse.org/Git for information on
configuring your Git environment.
Comment 2 John Arthorne CLA 2011-10-21 16:48:22 EDT
We need the following to happen:

- Webmaster disables commit hook
- Remy pushes all branches back to the repository
- Webmaster re-enables the commit hook
- Brian finds a new Git client
Comment 3 Brian de Alwis CLA 2011-10-21 16:56:12 EDT
If you have you have recently fetched from the repo, please attach your .git/packed-refs: that contains the commit refs for the branches.
Comment 4 Remy Suen CLA 2011-10-21 16:59:27 EDT
What is our backup strategy for these cases? Is it better to restore from the Foundation's backup or to execute the plan described by John in comment 2?
Comment 5 Remy Suen CLA 2011-10-21 17:01:41 EDT
Created attachment 205756 [details]
Remy's .git/packed-refs

(In reply to comment #3)
> If you have you have recently fetched from the repo, please attach your
> .git/packed-refs: that contains the commit refs for the branches.

Here is mine which should be the latest (relative to R4_development anyway), before Brian's push. R3_development may be old.
Comment 6 Brian de Alwis CLA 2011-10-21 17:24:25 EDT
(In reply to comment #5)
> Here is mine which should be the latest (relative to R4_development anyway),
> before Brian's push. R3_development may be old.

I guess the my push must have also triggered a GC as a lot of those refs point to invalid objects:

$ git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git git-platform.ui
[...]
$ cd git-platform.ui
$ mv ~/Downloads/packed-refs.txt .git/packed-refs 
$ git branch -a
error: refs/remotes/origin/Bug116920_investigation does not point to a valid object!
error: refs/remotes/origin/Bug172193_investigation does not point to a valid object!
error: refs/remotes/origin/Bug182059_investigation does not point to a valid object!
error: refs/remotes/origin/Bug43657 does not point to a valid object!
error: refs/remotes/origin/Bug_36957 does not point to a valid object!
error: refs/remotes/origin/DS_WORK does not point to a valid object!
error: refs/remotes/origin/EJP-v20020606branch does not point to a valid object!
error: refs/remotes/origin/EJP_KeyBinding does not point to a valid object!
error: refs/remotes/origin/EJP_LazyEditors does not point to a valid object!
[...many many lines removed...]
error: refs/tags/version3_2_lockdown_mergepoint20060608 does not point to a valid object!
* master
  origin/HEAD
  origin/R3_6_maintenance
  origin/R3_7_maintenance
  origin/R3_development
  origin/R4_development
  origin/master

So the important branches are all still there.
Comment 7 Brian de Alwis CLA 2011-10-21 18:00:53 EDT
(In reply to comment #3)
> If you have you have recently fetched from the repo, please attach your
> .git/packed-refs: that contains the commit refs for the branches.

My hypothesis, that Remy's packed-refs will contain the latest commits for the various branches, doesn't seem to hold: Remy's packed-refs has R3_6_maintenance's latest commit as 065d2d0 (dated 2011-05-10), whereas the latest that he pushed up (from EGit, I presume?) is commit a13f53d (dated 2011-08-12).
Comment 8 Dani Megert CLA 2011-10-22 01:39:16 EDT
I have quite a new state (pulled yesterday) in case this helps.
Comment 9 Remy Suen CLA 2011-10-22 08:29:18 EDT
(In reply to comment #8)
> I have quite a new state (pulled yesterday) in case this helps.

Dani, is your R3_development's branch's tip at commit 5b1f520a5d45522615b2eafa69b594231bc2e60f?
Comment 10 Paul Webster CLA 2011-10-22 11:31:02 EDT
I have a repo it looks like I pulled Oct 21 06:47

PW
Comment 11 Remy Suen CLA 2011-10-22 13:47:08 EDT
(In reply to comment #7)
> My hypothesis, that Remy's packed-refs will contain the latest commits for the
> various branches, doesn't seem to hold: Remy's packed-refs has
> R3_6_maintenance's latest commit as 065d2d0 (dated 2011-05-10), whereas the
> latest that he pushed up (from EGit, I presume?) is commit a13f53d (dated
> 2011-08-12).

Yes, I pushed using EGit.
Comment 12 Markus Keller CLA 2011-10-23 09:59:27 EDT
Created attachment 205769 [details]
git show-ref

Branches in my clone (pulled on Friday evening):
5b1f520a5d45522615b2eafa69b594231bc2e60f refs/remotes/origin/R3_development
771ffa4adf120a2eda06e58d9aeaa9328437878d refs/remotes/origin/R4_development
a13f53de2a0285b9427686372038e9e10660ba62 refs/remotes/origin/R3_6_maintenance
c92f667efff2087a9dadd6f261b6196ffadde50a refs/remotes/origin/R3_7_maintenance

Attaching the full $git show-ref
Comment 13 Markus Keller CLA 2011-10-23 12:00:39 EDT
Here's my repo (pulled Friday, Oct 21, evening in Europe):
http://dl.dropbox.com/u/9385300/eclipse.platform.ui_2011-10-23.zip

It contains a few touched files (nothing important). I never created any branches or tags locally.
Comment 14 Paul Webster CLA 2011-10-23 13:03:33 EDT
I had a look at Markus' refs, and we have different ones for one tag:

< ff80c5f88a189b4a4e96c71dc8f5738ba9625368 refs/tags/v20110825-1421
---
> a9ae49dc16b219c6bdf901b303be5f5423804eef refs/tags/v20110825-1421

PW
Comment 15 Markus Keller CLA 2011-10-23 13:23:12 EDT
> I had a look at Markus' refs, and we have different ones for one tag:

Paul's a9ae49 is the parent of my ff80c5, so it looks like the v20110825-1421 tag got moved on the server, and I only checked out the repo after it was moved.

Git operations don't update tags, so this is expected (and confirms that moving published tags is a no-go).
Comment 16 Dani Megert CLA 2011-10-24 02:50:30 EDT
(In reply to comment #9)
> (In reply to comment #8)
> > I have quite a new state (pulled yesterday) in case this helps.
> 
> Dani, is your R3_development's branch's tip at commit
> 5b1f520a5d45522615b2eafa69b594231bc2e60f?

Yes. But I'm behind with R4_development, so my repo is not the newest one.
Comment 17 Paul Webster CLA 2011-10-24 09:30:03 EDT
The push has wiped out commits as well, which is why we can't just push the tags and branches back.

We need the commit hooks disabled so we can push back the commits that goes with the tag/branch refs.

PW
Comment 18 Remy Suen CLA 2011-10-24 09:32:37 EDT
(In reply to comment #17)
> We need the commit hooks disabled so we can push back the commits that goes
> with the tag/branch refs.

I have emailed webmaster@eclipse.org requesting intervention at their earliest convenience.
Comment 19 Oleg Besedin CLA 2011-10-24 09:40:10 EDT
Is it possible to restore the repo from the server backup?
Comment 20 Remy Suen CLA 2011-10-24 09:43:13 EDT
(In reply to comment #19)
> Is it possible to restore the repo from the server backup?

That could be another option. Certainly a lot safer than what we're doing.
Comment 21 Denis Roy CLA 2011-10-24 09:50:01 EDT
> That could be another option. Certainly a lot safer than what we're doing.


We can restore the repo to our latest snapshot _before_ 2011-10-21 16:31:50 EDT 

That would likely be somewhere around 10-21 3:00am EDT, so you would have "lost" all day Friday.

Project lead, please confirm this is what you want.
Comment 22 Paul Webster CLA 2011-10-24 10:06:31 EDT
I have a copy of the 7 Friday commits, Denis, please replace eclipse.platform.ui.git with the backup.

PW
Comment 23 Paul Webster CLA 2011-10-24 10:07:16 EDT
Then we need to disable the commit hooks long enough for me/remy to push back the 7 commits.

PW
Comment 24 John Arthorne CLA 2011-10-24 10:10:40 EDT
Doesn't the commit hook just ensure that the commits belong to a current committer? In this case I would assume the 7 commits on Friday were made by current committers so it should be fine...
Comment 25 Paul Webster CLA 2011-10-24 10:12:27 EDT
(In reply to comment #24)
> Doesn't the commit hook just ensure that the commits belong to a current
> committer? In this case I would assume the 7 commits on Friday were made by
> current committers so it should be fine...

remy has them, and should be able to put them back quickly ... otherwise it's time spent tracking down individuals and getting them to re-commit their stuff in the correct order ...

PW
Comment 26 Dani Megert CLA 2011-10-24 10:19:49 EDT
(In reply to comment #24)
> Doesn't the commit hook just ensure that the commits belong to a current
> committer? In this case I would assume the 7 commits on Friday were made by
> current committers so it should be fine...

I also don't see why the commit hook is a problem.
Comment 27 Dani Megert CLA 2011-10-24 10:46:10 EDT
(In reply to comment #26)
> (In reply to comment #24)
> > Doesn't the commit hook just ensure that the commits belong to a current
> > committer? In this case I would assume the 7 commits on Friday were made by
> > current committers so it should be fine...
> 
> I also don't see why the commit hook is a problem.
Got it: it checks that the person who pushes is the same as in the committer field. And since Remy doesn't want to reply all changes manually he also needs to be able to push changes which he's not registered as committer. Makes sense.
Comment 28 John Arthorne CLA 2011-10-24 11:09:34 EDT
(In reply to comment #22)
> I have a copy of the 7 Friday commits, Denis, please replace
> eclipse.platform.ui.git with the backup.

In case it was unclear, Paul is the project lead so Denis please go ahead [1]. I will separately make sure the Foundation database is updated since it still lists Boris as lead.

[1] http://dev.eclipse.org/mhonarc/lists/platform-ui-dev/msg04980.html
Comment 29 Denis Roy CLA 2011-10-24 11:11:36 EDT
We're running through tapes now.  Please stand by.
Comment 30 Paul Webster CLA 2011-10-24 16:59:35 EDT
Any word on this?  I'm afraid to try anything else lest I destroy a new repo.

PW
Comment 31 Paul Webster CLA 2011-10-24 19:41:27 EDT
(In reply to comment #30)
> Any word on this?  I'm afraid to try anything else lest I destroy a new repo.


Can we hold off on replacing the eclipse.platform.ui.git directory?

Kim, could you try a build now?  I've pushed my home repo successfully to git.eclipse.org/gitroot/platform/eclipse.platform.ui.git

PW
Comment 32 Denis Roy CLA 2011-10-24 21:16:09 EDT
Tape restores are done by our ISP.  I'm not sure where they're at -- I'll ping them.  Regardless, they are instructed to restore the files in a different location, so we won't overwrite anything before touching base with you.
Comment 33 Kim Moir CLA 2011-10-25 08:14:17 EDT
I've started a build.
Comment 34 Dani Megert CLA 2011-10-25 12:43:48 EDT
In case the commit hook was disable, please make sure it gets enabled again.
Comment 35 Denis Roy CLA 2011-10-25 17:12:57 EDT
I've re-enabled the update hook.
Comment 36 Dani Megert CLA 2011-10-26 01:46:37 EDT
The repo is up and running again. Marking as FIXED.
Comment 37 Paul Webster CLA 2011-10-26 09:54:00 EDT
I'll just add the final fix.

We took a cloned repo that was up to date from Thursday and pulled Friday's 7 commits into R4_development and R3_6_maintenance only.  Denis disabled the commit hooks.  Then we pushed all tags  and pushed refs/remotes/origin/*:refs/heads/*

Pushing the refs also pushed back the GCed commits.

We should get that restored repo from the ISP and compare it with the public repo now, to confirm we've completely restored the repo.

PW
Comment 38 Denis Roy CLA 2011-10-26 13:35:26 EDT
(In reply to comment #32)
> Tape restores are done by our ISP. 

In the end, our managed backup service did not automatically traverse NFS mounts.  With the recent changes we'd done to our NFS servers, no code repos were being backed up.  That is now fixed, and we'll verify with some test restores later this week.

With much embarrassment, I humbly apologize for not being able to provide a restore.