More robust loading of agent launchers #1730
Replies: 3 comments
-
TASKS
|
Beta Was this translation helpful? Give feedback.
-
I'll explain here what the problem is and why it needs some discussion. THE PROBLEM The agents themselves are completely independent of the runner and engine that uses them. They run in a separate process and use whatever version of Because launchers for each agent are loaded in-process with the engine, they need to all use the compatible versions of any dependencies. In addition, these dependencies must be compatible with the engine itself. Currently, this applies to ORIGINAL SOLUTION The intent of the original issue was to resolve the problem by running launchers in a separate AppDomain. This seemed reasonable since launchers currently target the .NET Framework. Problems...
WHAT WE ACTUALLY NEED
WORKAROUND FOR NOW In the original implementation, each launcher had a small amount of duplicated code. I centralized some of it in the @nunit/engine-team @nunit/core-team Looking for alternative ideas here. |
Beta Was this translation helpful? Give feedback.
-
@nunit/engine-team The workaround is now in place for the latest 4.1.0-alpha builds of all three agent launchers. They now depend only on We should still continue to think about a more robust interface definition but it's not an urgent matter at this point. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Pluggable agents generally contain two assemblies, the launcher and the agent itself.
TestAgency
loads the launcher in it's own context and launcher starts the separate agent executable as a separate process. This means that the agent is independent of the engine, as intended. It uses whatever versions ofnunit.engine.api
,nunit.agent.core
, etc. with which it was initially built.It was initially thought that loading the launcher in the context of the engine and runner wouldn't cause problems. But that isn't the case. See issue #1727 for a very simple change that breaks all our launchers.
It would be a substantial improvement to the design if we were able to use launchers in their own context, with the same dependencies with which they were built. Ideally, we could do this by changing the engine alone but if necessary we could modify the existing agents and re-release them if necessary, before we create any more of them.
Beta Was this translation helpful? Give feedback.
All reactions