git reset failed

1,683 views
Skip to first unread message

Fredrik Wendt

unread,
Apr 9, 2015, 10:45:51 AM4/9/15
to go...@googlegroups.com
Hi, 

After having played around with git submodules and stuff (yes, I know that's vague - I'm not 100 % on what has happened to the git repo, not all people are here so I can ask), we're running into this error being reported by the Go server:

Modification check failed for material: URL: /.../source.repo/devops.atlasboard.git, Branch: master [Apr-09 16:37:53]
Working directory: pipelines/flyweight/9a078662-bdb1-4862-8d54-56739da3e70c

When an agent tries to run, we get this error:

[go] Start to prepare InformationRadiator/7/Build_And_Deploy_To_Test/1/build_and_deploy on xxx [/var/lib/go-agent] at Thu Apr 09 16:36:40 CEST 2015
[go] Cleaning working directory "/var/lib/go-agent/pipelines/InformationRadiator" since stage is configured to clean working directory
[go] Start updating files at revision 1150a36091debf5ad32d24e5bfc3211e1a195ae4 from /.../source.repo/devops.atlasboard.git
Initialized empty Git repository in /var/lib/go-agent/pipelines/InformationRadiator/.git/
[GIT] Fetch and reset in working directory pipelines/InformationRadiator
[GIT] Cleaning all unversioned files in working copy
[GIT] Cleaning submodule configurations in .git/config
[GIT] Fetching changes
[GIT] Performing git gc
[GIT] Updating working copy to revision 1150a36091debf5ad32d24e5bfc3211e1a195ae4
STDERR: fatal: Could not parse object '1150a36091debf5ad32d24e5bfc3211e1a195ae4'.
git reset failed for [pipelines/InformationRadiator]


Not sure how to proceed. If there's a way to "prune" all information about this repo, that would work for us as this is a toy thing.

Thanks in advance,

/ Fredrik

Aravind SV

unread,
Apr 9, 2015, 11:04:05 AM4/9/15
to Fredrik Wendt, go...@googlegroups.com
It's safe to move /var/lib/go-server/pipelines/flyweight/9a078662-bdb1-4862-8d54-56739da3e70c out of there, and the Go Server will check out the repo again once you've done that. Obviously, not knowing what happened, I can't tell you whether it will work. But, it's worth trying.

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian Lövsund

unread,
Apr 11, 2015, 2:00:20 AM4/11/15
to go...@googlegroups.com, fre...@growing-agility.com
Regarding same repo, but different error:

After fixing the corrupt git repo in question, caused by error in submodule handling, another issue appeared. 

2015-04-11 06:36:47,833 WARN [98@MessageListener for MaterialUpdateListener] MaterialDatabaseUpdater:117 - [Material Update] Modification check failed for material: URL: ******/devops.atlasboard.git, Branch: master com.thoughtworks.go.util.command.CommandLineException: Error performing command: --- Command ---
git log --date=iso --pretty=medium 1150a36091debf5ad32d24e5bfc3211e1a195ae4..
STDERR: fatal: Invalid revision range 1150a36091debf5ad32d24e5bfc3211e1a195ae4..HEAD

This seemed to be caused by faulty history in cruise.h2.db since I get the below output even after removing any references to the git repo from gocd config.

(06:34 ******@******** go-server) > grep -R 1150a36091debf5ad32d24e5bfc3211e1a195ae4 .
Binary file ./db/h2db/cruise.h2.db matches

Work Around:
1. Since I couldn't find an easy (and safe) way to manipulate the DB file, I copied the git repo to another URL, used that in the Go pipeline, which made go clone it to a new flyweight folder.
2. The pipeline now built fine with copied git repo.
3. Changed back to old URL, and for some reason that made  go clone the original repo to a new flyweight folder.
4. The pipeline new built successfully with original repo.

Perhaps some cleaning took place by Go in between some of my actions, making it look like I "tricked" it. :)

srinivas upadhya

unread,
Apr 15, 2015, 1:10:05 AM4/15/15
to go...@googlegroups.com, fre...@growing-agility.com


On Saturday, April 11, 2015 at 11:30:20 AM UTC+5:30, Christian Lövsund wrote:
Regarding same repo, but different error:

After fixing the corrupt git repo in question, caused by error in submodule handling, another issue appeared. 

2015-04-11 06:36:47,833 WARN [98@MessageListener for MaterialUpdateListener] MaterialDatabaseUpdater:117 - [Material Update] Modification check failed for material: URL: ******/devops.atlasboard.git, Branch: master com.thoughtworks.go.util.command.CommandLineException: Error performing command: --- Command ---
git log --date=iso --pretty=medium 1150a36091debf5ad32d24e5bfc3211e1a195ae4..
STDERR: fatal: Invalid revision range 1150a36091debf5ad32d24e5bfc3211e1a195ae4..HEAD

This seemed to be caused by faulty history in cruise.h2.db since I get the below output even after removing any references to the git repo from gocd config.

(06:34 ******@******** go-server) > grep -R 1150a36091debf5ad32d24e5bfc3211e1a195ae4 .
Binary file ./db/h2db/cruise.h2.db matches

Work Around:
1. Since I couldn't find an easy (and safe) way to manipulate the DB file, I copied the git repo to another URL, used that in the Go pipeline, which made go clone it to a new flyweight folder.
2. The pipeline now built fine with copied git repo.
3. Changed back to old URL, and for some reason that made  go clone the original repo to a new flyweight folder.
4. The pipeline new built successfully with original repo.

Perhaps some cleaning took place by Go in between some of my actions, making it look like I "tricked" it. :)

I think something in the "attributes" of material changed. Git material's "url" & "branch" are taken into account for computing wether the material is existing (one which Go has seen before or a new one). I assume the url changed for eg. you could have added a "/" or may be changed username:password in url etc?
Reply all
Reply to author
Forward
0 new messages