Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Inconsistent build across Grid Nodes
avishnyakov
#1 Posted : Monday, May 23, 2016 8:51:12 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/12/2015(UTC)
Posts: 27
Location: Australia

Thanks: 5 times
Was thanked: 6 time(s) in 6 post(s)
It seems that with the recent updates NCrunch gives the following message preventing distributed tests execution:

>>NCrunch: The build results for this project are not consistent across all computers within the grid.
** LOTS OF DETAILS HERE*

It was not like that before, so it is possible to disable that feature somewhere in the setttings?
Remco
#2 Posted : Monday, May 23, 2016 10:09:38 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
avishnyakov;8753 wrote:

It seems that with the recent updates NCrunch gives the following message preventing distributed tests execution:

>>NCrunch: The build results for this project are not consistent across all computers within the grid.
** LOTS OF DETAILS HERE*

It was not like that before, so it is possible to disable that feature somewhere in the setttings?


The reporting of this isn't a new feature - it's actually been in place since the first beta releases of v2, when the grid processing was first introduced. It's possible that it has started appearing due to a change in your environment or build system.

Generally when the engine reports this, it means that at least one of the nodes in your grid was unable to build a project where other nodes were able to. When NCrunch detects this situation, it tries to provide you with as much information about the build process as possible to better enable you to solve the problem. The best thing to do is take a look at the build result and see how it is different. If the problem appears intermittently, it may well be that something in your build system is intermittently failing.
1 user thanked Remco for this useful post.
avishnyakov on 5/23/2016(UTC)
avishnyakov
#3 Posted : Monday, May 23, 2016 10:13:25 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/12/2015(UTC)
Posts: 27
Location: Australia

Thanks: 5 times
Was thanked: 6 time(s) in 6 post(s)
Thanks Remco, seems to be the case.

Used to have only VS2013 + NCrunch and grid, all was fine.
Got VS2015 installed, here we go, started having all that fun.

The output says only the folllwing:
..\..\..\..\..\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (923, 7): The target "AssignLinkMetadata" does not exist in the project.

Not sure why and what, trying to solve that. Found only the following issue at MSBuild github:
https://github.com/Microsoft/msbuild/issues/544

Guess, some changes with the VS2015.
Remco
#4 Posted : Monday, May 23, 2016 11:41:18 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
VS2015 introduced a huge range of changes to the build system. This means that if you have VS2015 on your client machine (running MSBuild 14.0, which is standard for VS2015), then you have grid nodes running MSBuild 12.0 (the standard for VS2013), there is a high chance that you'll get inconsistent behaviour.

Grid nodes will generally try to use the version of MSBuild identical to that used on the client machine. Where this isn't available, they will fall back to closest version of MSBuild available.

The AssignLinkMetadata target is a new build target that was introduced with VS2015. It is invoked by MSBuild indirectly through the 'PrepareForBuildDependsOn' property, and is responsible for handling some edge cases around embedded resource links.

Prior to NCrunch v2.23, NCrunch would actually hard-code the value of this property to a fixed list of build targets, which excluded the PrepareForBuildDependsOn target. Under VS2013, this was safe, as all the VS2013 targets were included in the hard coded list. Unfortunately, this approach started introducing problems in VS2015 as the AssignLinkMetadata target wasn't being called and some projects were failing to build correctly. v2.23 introduced a fix in which the PrepareForBuildDependsOn is instead queried from MSBuild when the project is loaded (on the client machine). The value of this property is then fed back into MSBuild when the project is built (along with another target used by NCrunch to override some areas of the build process).

The result is that all VS2015 builds are now running correctly under v2.23, but it seems that it is now not possible to build a VS2015 project on a grid node using the build system from VS2013.

In theory, it should be possible to reverse this change in your projects by overriding the PrepareForBuildDependsOn property and forcing this to its VS2013 equivalent. For example:

<PropertyGroup>
<PrepareForBuildDependsOn>GetFrameworkPaths;GetReferenceAssemblyPaths</PrepareForBuildDependsOn>
</PropertyGroup>

This will skip the AssignLinkMetadata target and embedded resources in the compiled assembly may not be namespaced correctly, but it may allow the grid nodes to continue to work with the projects under VS2013. Of course, the better solution would be to upgrade the grid nodes ... In the long term, poking holes in the build system generally creates new problems over time.
avishnyakov
#5 Posted : Wednesday, May 25, 2016 11:22:22 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/12/2015(UTC)
Posts: 27
Location: Australia

Thanks: 5 times
Was thanked: 6 time(s) in 6 post(s)
It is not possible even with VS2013 / VS 2015 build tools installed.
Gave up, installed VS2013 on every grid node, seems to fix so it works well for the time being.

Pity, would say soved.
1 user thanked avishnyakov for this useful post.
Remco on 5/25/2016(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download