-
Notifications
You must be signed in to change notification settings - Fork 2
Always evaluate the context file in a separate process #313
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
base: master
Are you sure you want to change the base?
Conversation
|
sigh the tests passed locally for me 🤦 I'll look into it tomorrow. |
|
LGTM, thanks! Do we want to also remove the |
7eccae3 to
e4dae6d
Compare
e4dae6d to
bdb616a
Compare
|
(just checking what CI says after a rebase, there's a lingering segfault so it shouldn't be merged yet) |
The GUI used to have a special case for databases using the default environment where it would evaluate the context file in the same process. This is bad because then the context file might not be evaluated in the database directory, which would break local imports. Now we always evaluate it with `get_context_file()` in a separate process in the database directory.
bdb616a to
3be8373
Compare
|
@tmichela, this is another place the context file is run outside of the sandbox. What additionally complicates matters is that the sandbox arguments are stored in the listener settings rather than the DAMNIT database settings so we can't even get the sandbox arguments... This also made me realize a glaring omission in the sandboxing: it isn't used at all when reprocessing manually 🙃 The reason for not storing the sandbox arguments in the DAMNIT database is because then anyone would be able to change them. But we somehow need to allow retrieving the sandbox arguments from the listener (a trusted source). |
|
wouldn't it be simpler to handle reprocessing as other triggers? i.e. we send a request to the central listener? |
|
In some ways yes, but not having to go through the listener is very convenient for testing locally, and if we need the sandbox args anyway for the GUI then we might as well use it for reprocessing too. |
The GUI used to have a special case for databases using the default environment where it would evaluate the context file in the same process. This is bad because then the context file might not be evaluated in the database directory, which would break local imports. Now we always evaluate it with
get_context_file()in a separate process in the database directory.(CC @turkot)