Closed gaow closed 7 months ago
I can reproduce the problem with a Python 3.12 environment, but cannot figure out what went wrong immediately.
I have updated the test suite to add python 3.12 to catch all such problems.
ok, find the source of the problem. What we did was sending a compiled global statement in task file to be executed on remote host. However, the docker side uses python 3.10, and the test side uses 3.9, and a change in the ast
package has changed the format of the ast
object....
$ ssh -q root@localhost -p 32768 "bash --login -c ' sos execute t5ee683a10ef0f203 -v 4 -s force -m run'"
INFO: t5ee683a10ef0f203 started
File "/usr/local/lib/python3.10/site-packages/sos/__main__.py", line 2831, in main
args.func(args, workflow_args)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/sos/__main__.py", line 2831, in main
args.func(args, workflow_args)
File "/usr/local/lib/python3.10/site-packages/sos/__main__.py", line 1521, in cmd_execute
exit_code.append(executor.execute(task))
File "/usr/local/lib/python3.10/site-packages/sos/task_executor.py", line 95, in execute
res = self.execute_single_task(task_id, params, runtime, sig_content)
File "/usr/local/lib/python3.10/site-packages/sos/task_executor.py", line 146, in execute_single_task
prepare_env(global_def[0], global_def[1])
File "/usr/local/lib/python3.10/site-packages/sos/executor_utils.py", line 210, in prepare_env
exec(compile(gdef, filename="<ast>", mode="exec"), env.sos_dict._dict)
TypeError: required field "lineno" missing from alias
So the problem happens if local and remote sos has different versions of python, which we can fix, or ignore.
Ahh .... I think it is enough to check and report error or warning for that case, leaving it for users to fix. That should be fair enough.
sos 0.25.1 is released for this fix.
great thanks @BoPeng , i take that conda release is automatic and will be there in a few hours? Sorry i cannot remember if it is automatic or you have to click on some extra buttons. I'll merge the PR once I see it pass on conda-forge GitHub.
automatic, merged.
On Python 3.10 and SoS 0.25.0 this workflow:
it works well.
But on Python 3.12, it fails:
I have another workflow that shows a different error:
after we upgrade from Python 3.10 to 3.12 it seems we are crippled ..