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
Seqera Platform supports a kind of magic pseudo variable called $TW_AGENT_WORK, which is dynamically set to the working directory of the Tower Agent at the time of pipeline execution, and not at the time of compute environment creation. There is some discussion of it here, although it doesn't really seem to be documented anywhere.
However, seqera-kit doesn't seem to understand this, and instead tries to interpolate it from the environment at setup time. For example if I have a compute environment definition that has parameters a bit like this:
Traceback (most recent call last):
File "/Users/milton.m/Programming/TowerTemplate/venv/bin/seqerakit", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/milton.m/Programming/TowerTemplate/venv/lib/python3.12/site-packages/seqerakit/cli.py", line 198, in main
block_manager.handle_block(
File "/Users/milton.m/Programming/TowerTemplate/venv/lib/python3.12/site-packages/seqerakit/cli.py", line 146, in handle_block
block_handler_map[block](self.sp, args["cmd_args"])
File "/Users/milton.m/Programming/TowerTemplate/venv/lib/python3.12/site-packages/seqerakit/helper.py", line 364, in handle_compute_envs
method("add", *args)
File "/Users/milton.m/Programming/TowerTemplate/venv/lib/python3.12/site-packages/seqerakit/seqeraplatform.py", line 43, in __call__
return self.tw_instance._tw_run(command, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/milton.m/Programming/TowerTemplate/venv/lib/python3.12/site-packages/seqerakit/seqeraplatform.py", line 139, in _tw_run
full_cmd = self._construct_command(cmd, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/milton.m/Programming/TowerTemplate/venv/lib/python3.12/site-packages/seqerakit/seqeraplatform.py", line 74, in _construct_command
return self._check_env_vars(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/milton.m/Programming/TowerTemplate/venv/lib/python3.12/site-packages/seqerakit/seqeraplatform.py", line 94, in _check_env_vars
raise EnvironmentError(
OSError: Environment variable $TW_AGENT_WORK not found!
The same thing happens when using the Python API:
client=SeqeraPlatform(cli_args=["--output", "json"])
client.compute_envs(
"add", "slurm",
"--work-dir", "$TW_AGENT_WORK",
"--launch-dir", "$TW_AGENT_WORK",
# Other parameters excluded for brevity
)
The text was updated successfully, but these errors were encountered:
Seqera Platform supports a kind of magic pseudo variable called
$TW_AGENT_WORK
, which is dynamically set to the working directory of the Tower Agent at the time of pipeline execution, and not at the time of compute environment creation. There is some discussion of it here, although it doesn't really seem to be documented anywhere.However,
seqera-kit
doesn't seem to understand this, and instead tries to interpolate it from the environment at setup time. For example if I have a compute environment definition that has parameters a bit like this:I get a traceback with:
The same thing happens when using the Python API:
The text was updated successfully, but these errors were encountered: