From 1d811faf54d67e76f9ecd641ebc42c8bfff6831d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 11 Feb 2021 14:09:07 +0100 Subject: [PATCH 1/3] home-assistant: 2021.2.2 -> 2021.2.3 --- pkgs/servers/home-assistant/component-packages.nix | 2 +- pkgs/servers/home-assistant/default.nix | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 2f97cb4a968..d8bca0f5517 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2,7 +2,7 @@ # Do not edit! { - version = "2021.2.2"; + version = "2021.2.3"; components = { "abode" = ps: with ps; [ abodepy ]; "accuweather" = ps: with ps; [ accuweather ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index bb697d1035a..ae4f402947b 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -1,4 +1,4 @@ -{ stdenv, nixosTests, lib, fetchurl, fetchFromGitHub, fetchpatch, python3, protobuf3_6 +{ stdenv, nixosTests, lib, fetchFromGitHub, python3 # Look up dependencies of specified components in component-packages.nix , extraComponents ? [ ] @@ -57,7 +57,7 @@ let extraBuildInputs = extraPackages py.pkgs; # Don't forget to run parse-requirements.py after updating - hassVersion = "2021.2.2"; + hassVersion = "2021.2.3"; in with py.pkgs; buildPythonApplication rec { pname = "homeassistant"; @@ -76,7 +76,7 @@ in with py.pkgs; buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = version; - sha256 = "0y7yj3kwk2454yghslvv5s2783rch9pznhxrw4mh3plr6qzi70rp"; + sha256 = "0s1jcd94wwvmvzq86w8s9dwfvnmjs9l661z9pc6kwgagggjjgd8c"; }; # leave this in, so users don't have to constantly update their downstream patch handling @@ -203,6 +203,10 @@ in with py.pkgs; buildPythonApplication rec { "test_error_posted_as_event" # ssdp/test_init.py: RuntimeError: Event loop is closed "test_scan_match_st" + # sun/test_init.py: RuntimeError: Event loop is closed + "test_setting_rising" + # sun/test_trigger.py: RuntimeError Event loop is closed + "test_sunset_trigger" ]; preCheck = '' From 84972d805f410120600dd6cccb1c6c2764f8cd2e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 11 Feb 2021 14:16:10 +0100 Subject: [PATCH 2/3] python3Packages.pymyq: 3.0.0 -> 3.0.3 --- pkgs/development/python-modules/pymyq/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pymyq/default.nix b/pkgs/development/python-modules/pymyq/default.nix index f4b4a1b7920..e93d0b602b4 100644 --- a/pkgs/development/python-modules/pymyq/default.nix +++ b/pkgs/development/python-modules/pymyq/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "pymyq"; - version = "3.0.0"; + version = "3.0.3"; src = fetchFromGitHub { owner = "arraylabs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-uCXgJxMy5gZQBvhHnmfev/rfJXOjhLqZdOrn8SetUT0="; + sha256 = "1wrfnbz87ns2ginyvljna0axl35s0xfaiqwzapxm8ira40ax5wrl"; }; propagatedBuildInputs = [ From df1b15ce54fd2d047b5330ded0e923d156ab78f2 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 11 Feb 2021 16:01:01 +0100 Subject: [PATCH 3/3] home-assistant: reduce to two xdist job runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This more closely replicates home-assistants upstream test environment which runs on GitHub Actions, which according to its specifications¹ provides a 2-core CPU and `-n auto` would scale with the locally available thread count. This is another possible reason for the amount of race conditions (`RuntimeError: Event loop is closed`) we were seeing, since moving to parallel testing using xdist. Reenable a few tests, that are likely to be caused by those race conditions. [1] https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners --- pkgs/servers/home-assistant/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index ae4f402947b..fae857fda5d 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -181,7 +181,8 @@ in with py.pkgs; buildPythonApplication rec { ]; pytestFlagsArray = [ - "-n auto" + # limit amout of runners to reduce race conditions + "-n 2" # assign tests grouped by file to workers "--dist loadfile" # don't bulk test all components @@ -199,14 +200,6 @@ in with py.pkgs; buildPythonApplication rec { # keyring.errors.NoKeyringError: No recommended backend was available. "test_secrets_from_unrelated_fails" "test_secrets_credstash" - # system_log/test_init.py: assert 0 == 1 where 0 = len([]) - "test_error_posted_as_event" - # ssdp/test_init.py: RuntimeError: Event loop is closed - "test_scan_match_st" - # sun/test_init.py: RuntimeError: Event loop is closed - "test_setting_rising" - # sun/test_trigger.py: RuntimeError Event loop is closed - "test_sunset_trigger" ]; preCheck = ''