Repository navigation
fix(apps): bind volume mounts from RUNPOD_MOUNTS when the runtime did not - #626
Draft
justinwlin wants to merge 1 commit into
Draft
justinwlin wants to merge 1 commit into
justinwlin wants to merge 1 commit into
Conversation
… not vol.path reads bindings the worker runtime installs through _configure_mounts before user code. Runtime images published before that hook never call it, so on them every deployed NetworkVolume attached but vol.path raised "not mounted in the current execution". Deployed workers run the client's vendored runpod package, so the first vol.path lookup now installs the bindings from the RUNPOD_MOUNTS provisioning env itself when the runtime has not. A runtime that configured mounts still takes precedence.
| def test_path_binds_from_env_when_runtime_did_not(self, monkeypatch): | ||
| # runtime images released before the mounts hook never call | ||
| # _configure_mounts; the vendored sdk reads the env itself | ||
| import runpod.apps.volume as volume_mod |
| NetworkVolume("models").path | ||
|
|
||
| def test_invalid_env_bindings_raise(self, monkeypatch): | ||
| import runpod.apps.volume as volume_mod |
| def test_path_binds_from_env_when_runtime_did_not(self, monkeypatch): | ||
| # runtime images released before the mounts hook never call | ||
| # _configure_mounts; the vendored sdk reads the env itself | ||
| import runpod.apps.volume as volume_mod |
| NetworkVolume("models").path | ||
|
|
||
| def test_invalid_env_bindings_raise(self, monkeypatch): | ||
| import runpod.apps.volume as volume_mod |
This branch has not been deployed
This file contains hidden or 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
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.
In deployed apps,
NetworkVolume.pathraisedvolume '...' is not mounted in the current executioneven though the volume was attached at/runpod-volume.Cause
vol.pathreads bindings that the worker runtime installs by calling_configure_mountsbefore user code (sdk-runtimemounts.py, added 2026-09-29). The published runtime images (runpod/queue:py3.12-latestand the rest) were pushed on 2026-09-22 and don't contain that hook.docker runagainst the image shows nomounts.py, and itsqueue/worker.pynever callsconfigure_mounts. The bindings are never installed.Change
Deployed workers run the client's vendored
runpod, so the firstvol.pathlookup now installs the bindings from theRUNPOD_MOUNTSprovisioning env itself when the runtime hasn't. A runtime that configured mounts still takes precedence. Invalid JSON raisesVolumeError.This removes the SDK's dependence on the image for
vol.path. The images still need a rebuild for dev sessions, which run on the image's ownrunpod.Verification
rp flash deployon the current images, with a CPU queue writing throughvol.path / "probe.txt". It returned{'path': '/runpod-volume', 'read': 'ok'}. The app and volume were deleted afterward.pytest tests: all pass, coverage above 90%.