MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.49k stars 1.27k forks source link

Fix race condition in GUI namespace insertion #3022

Closed krisgesling closed 2 years ago

krisgesling commented 2 years ago

Description

When inserting a new namespace for the GUI, bus events could cause the dict to change while it is being iterated over.

How to test

Unsure - saw it in OVOS and can see how that could happen. Change shouldn't have a negative impact.

Contributor license agreement signed?

Thanks to @JarbasAI for identifying and fixing it

devops-mycroft commented 2 years ago

Voight Kampff Integration Test Succeeded (Results)

codecov-commenter commented 2 years ago

Codecov Report

Merging #3022 (f8f640e) into dev (dd710a6) will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #3022   +/-   ##
=======================================
  Coverage   53.04%   53.04%           
=======================================
  Files         123      123           
  Lines       11170    11170           
=======================================
  Hits         5925     5925           
  Misses       5245     5245           
Impacted Files Coverage Δ
mycroft/client/enclosure/base.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dd710a6...f8f640e. Read the comment docs.