Skip to content

cerbero: Try again to solve relocate_osx_libraries crash in CI

A fix was previously attempted in 7a53942b but it seems to have been insufficient since the crash is still happening from time to time on the CI:

Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/main.py", line 183, in main
    Main(sys.argv[1:])
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/main.py", line 53, in __init__
    self.run_command()
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/main.py", line 152, in run_command
    res = commands.run(command, self.config, self.args)
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/commands/__init__.py", line 78, in run
    return _commands[command].run(config, args)
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/commands/bootstrap.py", line 79, in run
    bootstrapper.start(jobs=args.jobs)
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/bootstrap/build_tools.py", line 131, in start
    oven.start_cooking()
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/build/oven.py", line 131, in start_cooking
    run_until_complete(self._cook_recipes(ordered_recipes))
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/utils/__init__.py", line 647, in run_until_complete
    result = loop.run_until_complete(tasks)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 612, in run_until_complete
    return future.result()
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/build/oven.py", line 415, in _cook_recipes
    raise e
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/build/oven.py", line 412, in _cook_recipes
    await run_tasks(tasks, recipes_done())
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/utils/__init__.py", line 695, in run_tasks
    await shutdown()
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/utils/__init__.py", line 682, in shutdown
    raise e
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/utils/__init__.py", line 689, in run_tasks
    await asyncio.gather(*tasks, return_exceptions=False)
  File "/Users/gst-ci/builds/gstreamer/cerbero/cerbero/build/oven.py", line 309, in cook_recipe_worker
    next_queue = queues[step]
KeyError: 'relocate_osx_libraries'

https://gitlab.freedesktop.org/gstreamer/cerbero/-/jobs/18307540

I can't reproduce it locally, probably because it requires a high degree of parallelism / the right conditions which are only achieved on the CI.

It's likely happening because the recipe step scheduler assumes that all recipes have the same steps. So instead of removing the step, skip the step inside the method when requested.

Also remove some obsoleted code / comments, and update the min Python version in the README.

Edited by Nirbheek Chauhan

Merge request reports