Error resetting TFS repository

Hi guys, 

Having trouble getting my TFS repository to reset, it seems to fail at “getting changesets” and just disables itself. I get this in the error log:

Error resetting repository could not execute query 
[ SELECT this_.Id as Id43_0_, this_.Revision as Revision43_0_, this_.Branch as Branch43_0_, this_.branchdisplayname as branchdi4_43_0_, this_.Username as Username43_0_, this_.Created as Created43_0_, this_.Comment as Comment43_0_, this_.ErrorMessage as ErrorMes8_43_0_, this_.CacheRevision as CacheRev9_43_0_, this_.Parents as Parents43_0_, this_.changesetstate as changes11_43_0_, this_.tagchangeinfo as tagchan12_43_0_, this_.HasFileCommits as HasFile13_43_0_, this_.IsBranchDeletion as IsBranc14_43_0_, this_.UserId as UserId43_0_, this_.RepositoryId as Reposit16_43_0_, this_.IssueConnectorId as IssueCo17_43_0_ FROM builds_changeset this_ WHERE this_.Id not in (SELECT this_0_.ChangesetId as y0_ FROM builds_buildchangeset this_0_) and this_.RepositoryId = :p0 ] 
Name:cp0 - Value:Continua.Modules.Builds.Repositories.Repository 
[SQL: SELECT this_.Id as Id43_0_, this_.Revision as Revision43_0_, this_.Branch as Branch43_0_, this_.branchdisplayname as branchdi4_43_0_, this_.Username as Username43_0_, this_.Created as Created43_0_, this_.Comment as Comment43_0_, this_.ErrorMessage as ErrorMes8_43_0_, this_.CacheRevision as CacheRev9_43_0_, this_.Parents as Parents43_0_, this_.changesetstate as changes11_43_0_, this_.tagchangeinfo as tagchan12_43_0_, this_.HasFileCommits as HasFile13_43_0_, this_.IsBranchDeletion as IsBranc14_43_0_, this_.UserId as UserId43_0_, this_.RepositoryId as Reposit16_43_0_, this_.IssueConnectorId as IssueCo17_43_0_ FROM builds_changeset this_ WHERE this_.Id not in (SELECT this_0_.ChangesetId as y0_ FROM builds_buildchangeset this_0_) and this_.RepositoryId = :p0]

We have no TFS branches (just the master branch), so the repo is set to ‘ignore branches’. It validates correctly, and enables correctly when I check ‘enable’, but then trying to reset or run a build just disables it again. I don’t think anything has changed recently so I’m a bit confused. Any ideas? This is on the latest released build (not the beta).

The new LDAP stuff on the beta is great by the way - worked well on our test server

Hi Luke,

Is your version 1.6 install pointing to the same database as the version 1.5 install? The 1.6 installer makes some changes to the database which are not compatible with earlier versions. If so then your only options are to restore the version 1.5 database from backup or to start using version 1.6. If you're using the bundled PostgreSQL database, then a backup will have been created under c:\ProgramData\VSoft\ContinuaCI.

If the database has not changed then I can't see any obvious reason why this error would occur. I have uploaded an updated version 1.5 build which will output additional details for the exception. If you can install this using the following links, reset the repository again and send us the new exception details this may help us to figure out what is going on.

[links removed]
Also try running the SQL directly against the database

SELECT this_.Id as Id43_0_, this_.Revision as Revision43_0_,
this_.Branch as Branch43_0_, this_.branchdisplayname as branchdi4_43_0_,
this_.Username as Username43_0_, this_.Created as Created43_0_, this_.Comment as Comment43_0_,
this_.ErrorMessage as ErrorMes8_43_0_, this_.CacheRevision as CacheRev9_43_0_, this_.Parents as Parents43_0_,
this_.changesetstate as changes11_43_0_, this_.tagchangeinfo as tagchan12_43_0_, this_.HasFileCommits as HasFile13_43_0_,
this_.IsBranchDeletion as IsBranc14_43_0_, this_.UserId as UserId43_0_, this_.RepositoryId as Reposit16_43_0_, this_.IssueConnectorId as IssueCo17_43_0_
FROM builds_changeset this_
WHERE this_.Id not in (SELECT this_0_.ChangesetId as y0_ FROM builds_buildchangeset this_0_) and this_.RepositoryId IS NOT null

Ah I guess that was the issue - I hadn’t released it wouldn’t be backwards compatible. But that makes sense now that I think about it. We’ve decided to just start using the beta so we don’t have to mess around restoring backups, I think the team are happy with it anyway. Repository is working again as normal, thanks Dave, we appreciate the support.

Regards,