I am trying out ditributed processing for the first time, and have successfully set up a node. However, tests that rely on settings found in the project user secrets appear to be unavailable to the node. is there a way to copy user screts to the node that I have missed?
Example:
appsettings.json
{
"My": {
"Setting":"#{Placeholder}#"
}
}
secrets.json
{
"My": {
"Setting":"42"
}
}
Test fails with message:
System.InvalidOperationException: Failed to convert '#{Placeholder}#' to type 'System.Int32'.
'Copy Referenced Assemblies To Workspace' is turned on.
If I understand the way that secrets are intended to work, they are essentially parameters that are supposed to be specific to the machine on which the code is being executed.
This is somewhat of an issue for distributed processing. Clearly the intent of distributed processing is usually to try and run the tests in the same way as they would exist on the client machine. However, this is not always the case. For example, your code may have a database connection string that might be different between your local machine and the grid node (which perhaps has a local instance with a different password).
Right now, we have no facility to copy secrets from the user machine to the remote grid node, and there are likely to be many barriers to prevent us from doing so, given the secrets are intended to be stored locally securely. So this is likely to be tricky for us to implement on the NCrunch side and may not actually be a good idea either.
So the solution here is to either avoid using secrets or make sure you have manually replicated them across your grid nodes.