-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execution context and modules activation for execution #338
Comments
We should reuse the
We could add a method such as |
Is there a builtin execution context ? I can't find it. The builtin wrorker doesn't make mention of execution context, and in run.py the context is asked to the database, which re-creates it from the stored config, but the Anyway I have started to work on this problem (along with #335). I will propose something soon. |
OK I understand now for the builtin context, it's the |
when the context is built from the database, really for execution (#338)
The last commit above implements what has been said just above, except for the adaptation of the context config to the job to run. This is not stored in the database, so the config has to be the same for all jobs of the execution, for now. |
Config modules can provide a static method
init_execution_context
in order to initialize things for execution. This method is called from the constructor ofExecutionContext
. The context is created in the functioncapsul.engine.execution_context()
, which, at the moment, does things in two steps:The constructor is called at this moment, and calls
init_execution_context
for modules which do not have config values yet.init_execution_context
will not be calles again.We should modify this, either by calling the constructor using the final complete (filtered) config, or call modules
init_execution_context
later after the config is setup.Additionally there is another issue with execution contexts: they are apparently meant for "execution", thus computing server side, initialize config modules in order to run code and software in this config. But we need to instantiate them also on client side, because they are needed for completion:
ProcessMetadata
needs an execution context in its initialization. So this execution runtime initialization is also performed on client side, using config values which are suited for the server, which 1. is an unnecessary work here, 2. will potentially lead to errors because the config does not match the client machine running the init code there.The text was updated successfully, but these errors were encountered: