It's all about the answers!

Ask a question

Projects get out of synch after each build requests


Amit Kumar (19514) | asked Jul 03 '16, 3:36 a.m.
edited Jul 07 '16, 8:33 a.m. by David Lafreniere (4.8k7)

Hello Team

Please help me with one of issue which i have observed in RTC. In Automation i need to schedule the builds, and now for build request we do not want any manual intervention.
Issue is when one scheduled build execute., Projects get out of synch from local work space. As a result, the second build do not contain the updated files which developers commit  . So even we get our builds as a success , it does not contain updated files, and always we need to reload the project in works space manually  to make the project in synch in order to get build done with updated files.



Can anyone please look into and update me how it can be resolve. ?
Basically thing is Projects get out of synch when any build request is executed. For second build request we need to make the Projects in synch by reloading the Projects manually. This i have observed in manual build requests also...

FYI, we updates files outside of RTC (It's our requirement) and i have checked these options also. But it did not work



Will appreciate if any one can help me on this!
Thanks

One answer



permanent link
Ralph Schoon (63.5k33646) | answered Jul 05 '16, 2:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
A repository workspace can get out of sync if it is loaded multiple times on disk and someone does SCM changes to one instance. In this case all other instances will be out of sync. So avoid this.

Usually a build does not make any changes to files under SCM. So a build usually only reads the data and then runs on it. So even if you have the same repository workspace loaded multiple times you can't get them out of sync.

If a personal build is run, the build system uses the users repository workspace of the user. Because of this it only has read access and can not check anything in.

So I don't see how your workspaces can get out of sync if you set this up reasonably clean with a technical build user.

Comments
Amit Kumar commented Jul 06 '16, 3:26 a.m.

Ralph, Thanks for this explanation

I have also same view. but here issue is with "target" folder. Let me explain this issue with this aspect

we have "src" folder where codes are being committed , now when we request a build OR automatic build triggers, after compilation it's save those files in "target" directory .

suppose at 10 AM , i have synched the projects manually and requested build, then once  this build get completes successfully (say at 10:05 AM) , there will be no discrepancy in "src" and "target".

now, suppose we have automatic build at 10:30 AM, This time also Build will get success ,but this time "src" and "target" will have some discrepancy. Files which are committed in between 10 AM to 10:30 AM will be there in "src" but not in "target" after Build completes.
This discrepancy is main issue .



Amit Kumar commented Jul 06 '16, 3:27 a.m.


Now, why i told this issue as "unsynch " issue because suppose at 10:15 AM , if i would have refreshed the pending changes tab manually, i would have found that "projects are out of synch" and then i would have to synch them manually, then at 10:30 AM in auto scheduled build, we would not have this discrepancy issue for sure.
this what i have observed and i am very sure in this observation



So, concluding my issue - after build gets completed, projects get out of synch which result in this discrepancy in very next build . And in automation we can't accept this manual intervention (synching projects manually).

However, in every build notification , we can see that new changes set were accepted before build triggered(referring here"automatic accepting pending changes before" option in build definition which i have checked already).

So, really this is challenge to find it's root cause . Something is there which is preventing projects to remain in synch. and i also must mention that in RTC we are accepting changes sets from Eclipse work space also and i hope there is no such issue with versions or any


Donald Nong commented Jul 06 '16, 3:45 a.m.

"Out of sync" has special meanings in the RTC context. What you described is sometimes the build source lags behind the latest commit. You need to explain how you set this up (streams, workspaces and etc) for us to understand whether this is expected or not.


Ralph Schoon commented Jul 06 '16, 5:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

In addition I still have a hard time understanding the description. The load should be an atomic operation it picks the changes available to accept and then loads the data to disc.
If you want to be sure to get rid of old data delete the load directory before loading. The same for whatever your target folder does.


Amit Kumar commented Jul 06 '16, 6:42 a.m.

Source doesn't lag behind. what i am trying to say is if i automate the builds , then Build will get success every time and source will also get updated commit.
issue is with "target" folder where compiled files go after build, files in "target" don't get updates with latest commit. i am using Maven, streams and workspace are set up properly.

also, i am using this option "delete directory before loading " of build engine .
Do load directory and Workspace directory should be same ? In my case i am using different load and workspace directory .

Is it possible that different .metadata (for load and workspace directory )is creating issue?


Ralph Schoon commented Jul 06 '16, 6:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

We don't have commit in RTC.
The target folder is not under the responsibility of the Jazz SCM portion of the build - at least not that I am aware of. The .metadata should not have any implication. Since it is the ominous "target" folder, i think it is likely related to whatever is done to create and update that. If you always use a new folder for laoding e.g. relative using the build ID, everything would be much cleaner and this could not even happen.


Amit Kumar commented Jul 06 '16, 1:56 p.m.

ok,
Do load directory and Workspace directory should be same ? In my case i am using different load and workspace directory .
Load directory - Under Build definition--> Jazz source control -->Load options



Ralph Schoon commented Jul 07 '16, 4:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Specify the load destination directory. This is the directory on the build machine where workspace files will be loaded. This value is also typically used on other pages in the definition to reference files under source control. You can specify an absolute path on the build machine, or a path relative to the current directory of the build engine process. Properties can be referenced using ${propertyName}.

The Load option defines where the SCM content should be loaded. This is a folder where the sandbox will end in. I don't know what you mean with other workspace directory. what other workspace are you referring to,

I give up, especially since there is still no real good description of your setup and with this communication mode we will get nowhere.
 

showing 5 of 8 show 3 more comments

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.