mkorpela / pabot

Parallel executor for Robot Framework test cases.
https://pabot.org
Apache License 2.0
475 stars 152 forks source link

Pabot won't run in Azure container #552

Open Jussi2022 opened 1 year ago

Jussi2022 commented 1 year ago

Hello,

I can run my tests with pabot on my laptop but when I use Azure pipeline and Docker container, I get this error message. But when I used very old container image, which has old Python 3.7 version, pabot works. What should I do to make this work on Python 3.11?

Storing .pabotsuitenames file Suite names resolved in 1.7397406101226807 seconds [ERROR] EXCEPTION RAISED DURING PABOT EXECUTION [ERROR] PLEASE CONSIDER REPORTING THIS ISSUE TO https://github.com/mkorpela/pabot/issues Pabot: 2.15.0 Python: 3.11.3 (main, May 23 2023, 13:25:46) [GCC 10.2.1 20210110] Robot Framework: 6.0.2 Total testing: 0.0 seconds Elapsed time: 1.75 seconds Traceback (most recent call last): File "/usr/local/bin/pabot", line 8, in sys.exit(main()) ^^^^^^ File "/usr/local/lib/python3.11/site-packages/pabot/pabot.py", line 1875, in main return sys.exit(main_program(args)) ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pabot/pabot.py", line 1918, in main_program _parallel_execute( File "/usr/local/lib/python3.11/site-packages/pabot/pabot.py", line 1319, in _parallel_execute pool = ThreadPool(len(items) if processes is None else processes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 930, in init Pool.init(self, processes, initializer, initargs) File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 196, in init self._change_notifier = self._ctx.SimpleQueue() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/multiprocessing/context.py", line 113, in SimpleQueue return SimpleQueue(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/multiprocessing/queues.py", line 341, in init self._rlock = ctx.Lock() ^^^^^^^^^^ File "/usr/local/lib/python3.11/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/multiprocessing/synchronize.py", line 162, in init SemLock.init(self, SEMAPHORE, 1, 1, ctx=ctx) File "/usr/local/lib/python3.11/multiprocessing/synchronize.py", line 57, in init sl = self._semlock = _multiprocessing.SemLock( ^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied

reubenmiller commented 10 months ago

Try upgrading to the 2.17.0, though python 3.7 will no longer work (as python 3.7 has already reached End Of Life (EOL))

You can check which combinations of python3 and RobotFramwork via the CI runner, https://github.com/mkorpela/pabot/actions/runs/7595146759

Jussi2022 commented 9 months ago

I tried with different versions of Python and Robot Framework but I got still the same error.

Test runs with different versions

Pabot: 2.17.0 Traceback (most recent call last): File "/usr/local/bin/pabot", line 8, in Python: 3.12.1 (main, Jan 17 2024, 06:27:26) [GCC 10.2.1 20210110] sys.exit(main()) Robot Framework: 6.0.2

Pabot: 2.17.0 Python: 3.12.1 (main, Jan 17 2024, 06:27:26) [GCC 10.2.1 20210110] Robot Framework: 7.0

Pabot: 2.17.0 Python: 3.12.1 (main, Jan 17 2024, 06:27:26) [GCC 10.2.1 20210110] Robot Framework: 6.1

Pabot: 2.17.0 Python: 3.10.13 (main, Jan 17 2024, 06:59:00) [GCC 10.2.1 20210110] Robot Framework: 6.1

The 1st log

Storing .pabotsuitenames file Suite names resolved in 1.9736604690551758 seconds [ERROR] EXCEPTION RAISED DURING PABOT EXECUTION [ERROR] PLEASE CONSIDER REPORTING THIS ISSUE TO https://github.com/mkorpela/pabot/issues Pabot: 2.17.0 Traceback (most recent call last): File "/usr/local/bin/pabot", line 8, in Python: 3.12.1 (main, Jan 17 2024, 06:27:26) [GCC 10.2.1 20210110] sys.exit(main()) Robot Framework: 6.0.2 Total testing: 0.0 seconds Elapsed time: 2.0 seconds ^^^^^^ File "/usr/local/lib/python3.12/site-packages/pabot/pabot.py", line 1889, in main return sys.exit(main_program(args)) ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pabot/pabot.py", line 1932, in main_program _parallel_execute( File "/usr/local/lib/python3.12/site-packages/pabot/pabot.py", line 1333, in _parallel_execute pool = ThreadPool(len(items) if processes is None else processes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 930, in init Pool.init(self, processes, initializer, initargs) File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 196, in init self._change_notifier = self._ctx.SimpleQueue() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/context.py", line 113, in SimpleQueue return SimpleQueue(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/queues.py", line 358, in init self._rlock = ctx.Lock() ^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/synchronize.py", line 169, in init SemLock.init(self, SEMAPHORE, 1, 1, ctx=ctx) File "/usr/local/lib/python3.12/multiprocessing/synchronize.py", line 57, in init sl = self._semlock = _multiprocessing.SemLock( ^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied

reubenmiller commented 9 months ago

Since you haven't include much information about how you are calling pabot or more detailed information about the environment it is running under...it's a hit hard to know what is really going on...but I'll take a stab anyway...

You're getting a Permission Denied error so it indicates that pabot can't write to the directory or file (most likely some state it uses to coordinate the tests or write the intermediate output files to)...so I would check:

But again, all guesses based on lack of further information.