You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> import workflow_state
>>> from workflow_state import workflow_state as ws
>>> ws('a', 'b', '20240101T1200Z', cylc_run_dir='/home/another_user')
Traceback (most recent call last):
File "/home/user/miniconda3/envs/cylc-dev/lib/python3.11/site-packages/cylc/flow/workflow_files.py", line 872, in infer_latest_run
id_ = str(path.relative_to(cylc_run_dir))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/miniconda3/envs/cylc-dev/lib/python3.11/pathlib.py", line 730, in relative_to
raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: '/home/another_user/a' is not in the subpath of '/home/548/tc2375/cylc-run' OR one path is relative and the other is absolute.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/548/tc2375/cylc/cylc/flow/xtriggers/workflow_state.py", line 87, in workflow_state
_, workflow = infer_latest_run(Path(cylc_run_dir, workflow))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/miniconda3/envs/cylc-dev/lib/python3.11/site-packages/cylc/flow/workflow_files.py", line 874, in infer_latest_run
raise ValueError(f"{path} is not in the cylc-run directory")
ValueError: /home/another_user/a is not in the cylc-run directory
>>> from pathlib import Path
>>> a=Path('/home/tc2375')
>>> a.relative_to('/home/another_user')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/miniconda3/envs/cylc-dev/lib/python3.11/pathlib.py", line 730, in relative_to
raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: '/home/tc2375' is not in the subpath of '/home/another_user' OR one path is relative and the other is absolute.
>>>
Reproducible Example
See above. The relative_to method does not work for across user checking.
You can do similar from the command line interface, but make sure to use the --debug flag otherwise the error message is misleading/unhelpful.
Expected Behaviour
Should be able to use workflow_state across different users.
The text was updated successfully, but these errors were encountered:
Thanks @ColemanTom I think you're right. We must be lacking a test for this. My last manual test, it seems that it worked because I had a workflow of the same name in my own run-dir.
Looks like some of the new Cylc 8 "workflow_files" code assumes owner-only run-dirs...
Description
Reproducible Example
See above. The
relative_to
method does not work for across user checking.You can do similar from the command line interface, but make sure to use the
--debug
flag otherwise the error message is misleading/unhelpful.Expected Behaviour
Should be able to use workflow_state across different users.
The text was updated successfully, but these errors were encountered: