Jump to content

TeamCity Plugin - Plastic tries to diff changeset 0


Twin17

Recommended Posts

Hi all,
I have a problem with the TeamCity plugin for Plastic. Cannot find the reason why, randomly, it starts trying to diff the cs:0 of a repo with its parent.

A log for broader understanding:
Failed to collect changes, error: Error collecting changes for VCS repository '"Project.Vcs.6" {instance id=21304, parent internal id=1753, parent id=Project_ProjectVcs6, description: "PlasticSCM: br:/main@Project.subproject@ssl://plasticserver.com:8088"}' Error getting diff info of 0: Can't diff cset cs:0@rep:Project.subproject@repserver:ssl://plasticserver.com:8088 because it doesn't have a parent. , VCS root: "Project.Vcs.6" {instance id=21304, parent internal id=1753, parent id=Project_ProjectVcs6, description: "PlasticSCM: br:/main@Project.subproject@ssl://plasticserver.com:8088"}

In the end the only solution is to recreate the VCS root, and it starts working for a while.

Can someone point me in the right direction?

Thanks

 

Link to comment
Share on other sites

Hi, 
Sorry for the delay, i was asking the developers if they had done any of those actions. They reported back that they haven't renamed or removed CSs, and also one of the usual repos that gives out this error, has not received modifications for months.

Link to comment
Share on other sites

Hi,
I don't think it will help much having the log, as it just does it at the beginning, it's a few added lines over what i already pasted. 
However i'll attach a log (with changed names) for reference.

In the meantime thanks for your help, if you need anything specific to see or if I may help you further, just let me know.

 

 

tclog.log

Link to comment
Share on other sites

Hello,
Sadly i guess not, the error is randomly happening, and as you could see, logs are not very speaking. 

It's still good to know that this can happen in these known situations, i can eventually warn the devs about it. 

For now, i don't think we can go much more than this. I'll update in case i get any reproducibility.

 

Thanks!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

We have the same issue when building from /main branch. It is not possible to build from this branch because of this error and it always happens when you try to build from it. Only workaround is to create a child branch from the CS you want to build.

The Changeset 0 by default has now parent.

image.png.6c1d3894769ac2abba72ed3bd7bf10c2.png

We are currently using Plastic Teamcity Plugin version SNAPSHOT-202108051447 . But I will try to update and see if this is fixed.

Link to comment
Share on other sites

1 hour ago, calbzam said:

Hi @thomas.weltenbauer., We have only seen this kind of problems when removing/deleting/moving chanegests/branches. Could it be your case?

If you recreate the VCS root, does it help to runa build in the main branch again?

Regards,

Carlos.

Hi @calbzam

Thank you for your answer.

No, this is not the case. It is just a build from the main branch (initial branch), which is there since the beginning of the repository and contains changeset 0, which Plastic is diffing based on the error message in teamcity:

Error getting diff info of 0: Can't diff cset cs:0@rep:RepSpecs because it doesn't have a parent.

Note: I removed the repository specs because it contains repository and server URL.

It is possible to prevent the plugin to check for changes on changeset 0?

Recreating the VCS root does not change this behaviour.

Link to comment
Share on other sites

Maybe because there was never a build from this branch before? Looks like all changesets are evaluated for pending changes that would be contained in this build. Which means starting from current changeset and going backward all changesets contained in the branch?

The error happens in the "Collecting changes" part before the build config itself is even started.

With the given settings below and starting the build with the parameter "branch" set to /main the error occurs. It does not matter what is happening after this, so this even happens with an empty build config for the main branch. All other branches (which have changesets with parents) are working without problems. Only changeset 0 seems to be the problem.


image.thumb.png.9750a282cad68951941717888615aabf.png

-------------------------------------

image.thumb.png.4e3a8c90645d3120b8dd390f80fd4781.png

Link to comment
Share on other sites

Hi,

It's a bit stange because it looks like the default configuration and we haven't been reported this issue in the past (other than this above message where recreting the VCS seemed to fix the problem).

- If you remove the polling to manually run the build, does it make any change?

- If you unckeck "Exclude default branch changes from other branches" does it make any difference?

Otherwise, we will try to reproduce the issue in our labs. You are using SNAPSHOT-202210120016 of the plugin but what is your Bamboo version?

Regards,

Carlos.

Link to comment
Share on other sites

38 minutes ago, calbzam said:

Hi,

It's a bit stange because it looks like the default configuration and we haven't been reported this issue in the past (other than this above message where recreting the VCS seemed to fix the problem).

- If you remove the polling to manually run the build, does it make any change?

- If you unckeck "Exclude default branch changes from other branches" does it make any difference?

Otherwise, we will try to reproduce the issue in our labs. You are using SNAPSHOT-202210120016 of the plugin but what is your Bamboo version?

Regards,

Carlos.

Oh I'm sorry, this is Teamcity, not Bamboo. Teamcity Version is 2022.10 (build 116751).

I tested "Exclude default branch changes from other branches". It does not change anything regarding this error.

The build already is a manual build. We don't have any triggers in this test case. It's just starting a new build with the given branch with the "run" button in Teamcity.

But to make sure I increased the maximum polling time to prevent polling to interfere, which does not change anything. The "collect changes" is part of the build pre steps in teamcity which we have no direct control of (as far as I know, except for the settings regarding included branches, etc.).

Maybe no one is starting builds from main branch? We hat this requirement multiple times in our project, but as this is working with sub branches from the given changesets it is just a matter of some more steps before building.

But for automated builds like nightlies it would be create to build from the main branch as well.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...