-
Notifications
You must be signed in to change notification settings - Fork 48
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
Enable working_dir configurability and safety #1689
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yadudoc
force-pushed
the
configure_tasks_working_dir
branch
from
October 23, 2024 15:10
4891e3b
to
c34d27b
Compare
khk-globus
reviewed
Oct 29, 2024
changelog.d/20241023_095610_yadudoc1729_configure_tasks_working_dir.rst
Outdated
Show resolved
Hide resolved
changelog.d/20241023_095610_yadudoc1729_configure_tasks_working_dir.rst
Outdated
Show resolved
Hide resolved
compute_endpoint/globus_compute_endpoint/engines/globus_compute.py
Outdated
Show resolved
Hide resolved
compute_endpoint/globus_compute_endpoint/engines/globus_compute.py
Outdated
Show resolved
Hide resolved
compute_endpoint/globus_compute_endpoint/engines/process_pool.py
Outdated
Show resolved
Hide resolved
yadudoc
force-pushed
the
configure_tasks_working_dir
branch
3 times, most recently
from
October 31, 2024 14:05
28c9e5e
to
22cc988
Compare
yadudoc
force-pushed
the
configure_tasks_working_dir
branch
2 times, most recently
from
November 11, 2024 17:51
cec12b8
to
2223771
Compare
khk-globus
reviewed
Nov 11, 2024
compute_endpoint/globus_compute_endpoint/engines/globus_compute.py
Outdated
Show resolved
Hide resolved
compute_endpoint/globus_compute_endpoint/engines/thread_pool.py
Outdated
Show resolved
Hide resolved
yadudoc
force-pushed
the
configure_tasks_working_dir
branch
4 times, most recently
from
November 13, 2024 00:56
f88331a
to
dcdec87
Compare
`ThreadPoolEngine` and `ProcessPoolEngine` now pass the `working_dir` default `"tasks_working_dir"` to the `GlobusComputeEngineBase`, which makes the path absolute. When `execute_task` runs the cwd is changed to `working_dir`, ensuring that tasks run in the same directory. * Added a new method `GlobusComputeEngineBase.set_working_dir()` to ensure `working_dir` is absolute. * Enforce absolute paths for `run_dir` in `execute_task()` * Removed an obsolete test
khk-globus
force-pushed
the
configure_tasks_working_dir
branch
from
November 13, 2024 02:45
dcdec87
to
6865316
Compare
khk-globus
approved these changes
Nov 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently
ThreadPoolEngine
andProcessPoolEngine
now pass the working_dir: defaulttasks_working_dir
.Executing functions on these engines affect subsequent function execution when they say change directory for eg, unlike
GlobusComputeEngine
. When executing functions, ourexecute_task
wrapper currently attempts to look for atasks_working_dir
in the current dir, creates it if not present, and then switches into it. Unfortunately, each subsequent function finds itself one directory deeper.GlobusComputeEngineBase
to check if theworking_dir
is an absolute path, and if not make it absolute. This ensures that every function would run in~/.globus_compute/<endpoint_name>/tasks_working_dir
.working_dir
is now a configurable option for all engines.Fixes # (issue)
[sc-36710]
Type of change
Choose which options apply, and delete the ones which do not apply.