basnijholt / adaptive-lighting

Adaptive Lighting custom component for Home Assistant
https://basnijholt.github.io/adaptive-lighting/
Apache License 2.0
1.71k stars 127 forks source link

Test HA core v2023.6 until v2024.2 #942

Closed basnijholt closed 2 months ago

basnijholt commented 4 months ago

@protyposis, I reverted back to the old way of testing where we hack the adaptive_lighting folder into core/components. I did this because I tried to identify why a test started breaking after ≥2024.1.

With the pytest plugin it was impossible to run git bisect on core

(for my own sake documenting this) After reverting and removing `

git bisect start
git bisect good 2024.1.6
git bisect bad 2024.2.5
git bisect run ./test.sh
❯ cat test.sh
#!/bin/bash
python3 -b -X dev -m pytest \
            -qq \
            --timeout=9 \
            --durations=10 \
            -o console_output_style=count \
            --dburl=postgresql://postgres:password@127.0.0.1/homeassistant-test \
            -p no:sugar tests/components/adaptive_lighting/test_switch.py::test_light_switch_in_specific_area

I found the problem:

commit 329eca49185034a722f91881568de53b9e8a1971
Author: Erik Montnemery <erik@montnemery.com>
Date:   Tue Jan 23 08:14:28 2024 +0100

    Store area registry entries in a UserDict (#108656)

    * Store area registry entries in a UserDict

    * Address review comments

 homeassistant/helpers/area_registry.py | 92 ++++++++++++++++++++++------------
 1 file changed, 61 insertions(+), 31 deletions(-)
bisect found first bad commit