ray/dashboard/modules/job/tests
Archit Kulkarni a67c8a0739
[runtime_env] Add temporary URI reference to prevent URI deletion before job starts (#24719)
Packages are uploaded to the GCS for `runtime_env`.  These packages are garbage collected when their refcount becomes zero.

The problem is the reference doesn't get incremented until the job starts, which happens after the package is uploaded.  It's possible for the package's refcount to go to zero in between the upload and when the job starts, causing the package to be deleted before it's needed by the job.  It's likely the cause of https://github.com/ray-project/ray/issues/23423.

We can't just increment the refcount at the time of upload, because if the script is killed before the job is started (e.g. via Ctrl-C) then the reference will never be decremented and the package will never be deleted.

The solution in this PR is to increment the refcount at the time of upload, but automatically decrement after a configurable timeout (default 30s).  This should be enough time for the job to start.  When the job starts, it increments the refcount as usual and decrements it when the job finishes or is killed.

Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
2022-05-23 10:25:04 -05:00
..
backwards_compatibility_scripts [Jobs] Reenable test_backwards_compatibility using Ray 1.12 (#24124) 2022-04-26 13:53:51 -05:00
subprocess_driver_scripts [job submission] Don't set CUDA_VISIBLE_DEVICES in job driver (#24546) 2022-05-10 11:43:04 -05:00
pip_install_test-0.5-py3-none-any.whl [runtime env] Support .whl files in py_modules (#22368) 2022-03-16 16:37:10 -05:00
test_backwards_compatibility.py [Jobs] Reenable test_backwards_compatibility using Ray 1.12 (#24124) 2022-04-26 13:53:51 -05:00
test_cli.py [job submission] Fix address defaulting behavior (#24970) 2022-05-20 14:10:36 -05:00
test_cli_integration.py [job submission] Fix address defaulting behavior (#24970) 2022-05-20 14:10:36 -05:00
test_common.py [runtime env] Support .whl files in py_modules (#22368) 2022-03-16 16:37:10 -05:00
test_http_job_server.py [job submission] Fix address defaulting behavior (#24970) 2022-05-20 14:10:36 -05:00
test_job_manager.py [job submission] Don't set CUDA_VISIBLE_DEVICES in job driver (#24546) 2022-05-10 11:43:04 -05:00
test_sdk.py [runtime_env] Add temporary URI reference to prevent URI deletion before job starts (#24719) 2022-05-23 10:25:04 -05:00
test_utils.py [CI] Format Python code with Black (#21975) 2022-01-29 18:41:57 -08:00