List of steps to reproduce (step by step, including full links if applicable):
I have a bunch of jobs that I am currently running using the old Grid Engine and I want to move them to the new Jobs framework. All of my jobs start by activating a python virtual environment and then using the python3 command from this venv to invoke a Python script. The work with no issues using the Grid Engine.
For the sake of this bug report, we can use ][https://github.com/PersianWikipedia/fawikibot/blob/master/HujiBot/grid/jobs/daily.sh|this script]], also copied below:
. ~/venv/bin/activate python3 ~/core/pwb.py touch -page:"صفحهٔ_اصلی" -purge python3 ~/core/pwb.py hujibot_20 python3 ~/core/pwb.py weekly-slow 14
What happens?:
When I send the job to the Grid Engine using jsub -N "daily" -once -o ~/err/daily.out -e ~/err/daily.err ~/grid/jobs/daily.sh it works without issues.
When I send a similar job to the new Jobs framework using toolforge-jobs run "daily" --command ~/grid/jobs/daily.sh --image tf-bullseye-std the job fails quickly. Here is what I see in the daily.err file which the new Jobs framework creates in the home directory of my tool account:
/data/project/huji/grid/jobs/daily.sh: 2: python3: not found /data/project/huji/grid/jobs/daily.sh: 3: python3: not found /data/project/huji/grid/jobs/daily.sh: 4: python3: not found
This indicates that the . ~/venv/bin/activate line executed with no issue (note that the first error line is line 2), but despite that, python3 command is not available.
What should have happened instead?:
When I run . ~/venv/bin/activate interactively or using the Grid Engine, python3 is available. It should be the same with the Jobs framework too.