Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home-assistant: 2021.5.3 -> 2021.5.4 #123056

Merged
merged 3 commits into from May 17, 2021
Merged

Conversation

mweinelt
Copy link
Member

Motivation for this change

https://github.com/home-assistant/core/releases/tag/2021.5.4

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@r-rmcgibbo
Copy link

r-rmcgibbo commented May 15, 2021

Result of nixpkgs-review pr 123056 at d4a64aa run on aarch64-linux 1

1 package failed to build:
  • home-assistant

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.


Result of nixpkgs-review pr 123056 at d4a64aa run on x86_64-linux 1

1 package failed to build:
  • home-assistant

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.

@happysalada
Copy link
Contributor

Result of nixpkgs-review pr 123056 run on x86_64-darwin 1

@happysalada
Copy link
Contributor

How weird, it says nothing to be built for me.

@fabaff
Copy link
Member

fabaff commented May 15, 2021

Result of nixpkgs-review pr 123056 run on x86_64-linux 1

1 package built:
  • home-assistant

@happysalada
Copy link
Contributor

There seems to have been a failure on aarch64

 >
       > tests/components/hyperion/test_config_flow.py::test_auth_create_token_approval_declined_task_canceled[pyloop]
       >   /nix/store/l8hhssp3l42h05nxh7f8avd05jxs8lwm-python3.8-aiohttp-3.7.4.post0/lib/python3.8/site-packages/aiohttp/test_utils.py:536: RuntimeWarning: coroutine 'ServiceRegistry.async_call' was never awaited
       >     gc.collect()
       >
       > -- Docs: https://docs.pytest.org/en/stable/warnings.html
       > =========================== short test summary info ============================
       > FAILED tests/components/prometheus/test_init.py::test_view[pyloop] - assert '...
       > ===== 1 failed, 8959 passed, 5 skipped, 7005 warnings in 798.98s (0:13:18) =====
       For full logs, run 'nix log /nix/store/ip9law6xvsbb34vrmm4326a86ddffvpq-homeassistant-2021.5.4.drv'.

Can somebody confirm it's a transient failure?

@fabaff
Copy link
Member

fabaff commented May 15, 2021

Result of nixpkgs-review pr 123056 run on aarch64-linux 1

1 package failed to build:
  • home-assistant

I have seen the prometheus test and the mobile_app/test_webhook.py test failing from time to time.

@mweinelt
Copy link
Member Author

mweinelt commented May 15, 2021

Let's see if we can get some more details on those flaky tests using --showlocals. I can't seem to reproduce them locally.

@mweinelt
Copy link
Member Author

mweinelt commented May 15, 2021

@fabaff @happysalada I need someone to reproduce the issue with bdabf32 (#123056) and get a complete log of the failing test.

@ofborg ofborg bot requested a review from fabaff May 15, 2021 15:53
@fabaff

This comment has been minimized.

@mweinelt
Copy link
Member Author

The mobile app issue reproduced on my RPi4 (aarch64-linux).

____________________ test_webhook_handle_get_config[pyloop] ____________________
[gw1] linux -- Python 3.8.9 /nix/store/7i305r9i4rsb1hmqwkdmphjf430niq3l-python3-3.8.9/bin/python3.8

hass = <homeassistant.core.HomeAssistant object at 0xffffc9ec6fa0>
create_registrations = ({'cloudhook_url': None, 'remote_ui_url': None, 'secret': '00c930ab9c1c724ab514ac14ac40a410ad7bf089b6f23cef4e6e9b27833...emote_ui_url': None, 'secret': None, 'webhook_id': 'd62002d044f9307156434143a8ee16587c591093f500721ef3fe0e3c823b82ba'})
webhook_client = <aiohttp.test_utils.TestClient object at 0xffffc9c874f0>

    async def test_webhook_handle_get_config(hass, create_registrations, webhook_client):
        """Test that we can get config properly."""
        resp = await webhook_client.post(
            "/api/webhook/{}".format(create_registrations[1]["webhook_id"]),
            json={"type": "get_config"},
        )
    
        assert resp.status == 200
    
        json = await resp.json()
        if "components" in json:
            json["components"] = set(json["components"])
        if "allowlist_external_dirs" in json:
            json["allowlist_external_dirs"] = set(json["allowlist_external_dirs"])
    
        hass_config = hass.config.as_dict()
    
        expected_dict = {
            "latitude": hass_config["latitude"],
            "longitude": hass_config["longitude"],
            "elevation": hass_config["elevation"],
            "unit_system": hass_config["unit_system"],
            "location_name": hass_config["location_name"],
            "time_zone": hass_config["time_zone"],
            "components": hass_config["components"],
            "version": hass_config["version"],
            "theme_color": "#03A9F4",  # Default frontend theme color
        }
    
>       assert expected_dict == json
E       AssertionError: assert {'components'...st home', ...} == {'components'...st home', ...}
E         Omitting 8 identical items, use -vv to show
E         Differing items:
E         {'theme_color': '#03A9F4'} != {'theme_color': 'blue'}
E         Use -v to get the full diff

@fabaff
Copy link
Member

fabaff commented May 15, 2021

Same for me with aarch64-linux (Raspberry Pi 4). I guess that I would see the same output if I could scroll back more...

[...]
=========================== short test summary info ============================
FAILED tests/components/mobile_app/test_webhook.py::test_webhook_handle_get_config[pyloop]
===== 1 failed, 8959 passed, 5 skipped, 465 warnings in 5707.48s (1:35:07) =====
builder for '/nix/store/g2vmjkhjsrzj0dzp2586vldfhdvgidwy-homeassistant-2021.5.4.drv' failed with exit code 1
error: build of '/nix/store/g2vmjkhjsrzj0dzp2586vldfhdvgidwy-homeassistant-2021.5.4.drv' failed

@mweinelt
Copy link
Member Author

You could scroll back more, if you didn't use nixpkgs-review to build, but instead just used nix-build -A home-assistant. You can even check out pull requests using a simple git alias:

[alias]
	cpr="!f() { git fetch origin refs/pull/$1/head && git checkout FETCH_HEAD; }; f"
❯ git cpr 123056
From https://github.com/NixOS/nixpkgs
 * branch                    refs/pull/123056/head -> FETCH_HEAD
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
warning: The last gc run reported the following. Please correct the root cause
and remove /home/hexa/git/nixos/master/.git/worktrees/release-20.09/gc.log.
Automatic cleanup will not be performed until the file is removed.

warning: There are too many unreachable loose objects; run 'git prune' to remove them.

Updating files: 100% (21113/21113), done.
Note: switching to 'FETCH_HEAD'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at bdabf32fdd0 home-assistant: print full variables on test error

@fabaff
Copy link
Member

fabaff commented May 16, 2021

I was playing around with the terminals in VScodium. Their implementation is somehow limited in the amount of lines you can scroll back by default (unlike gnome-terminal which is set to 10 k lines in NixOS).

After a reboot I can't reproduce the failure (around mobile_app/test_webhook.py) on a Raspberry Pi 4.

____________________ test_webhook_handle_get_config[pyloop] ____________________
[gw18] linux -- Python 3.8.9 /nix/store/q6gfck5czr67090pwm53xrdyhpg6bx67-python3-3.8.9/bin/python3.8

hass = <homeassistant.core.HomeAssistant object at 0x7ffe4e71f370>
create_registrations = ({'cloudhook_url': None, 'remote_ui_url': None, 'secret': 'ed8ac650f2b5865733d2cea4ad1b6b02bcfbdcc3e527524bc1c457d5c6f...emote_ui_url': None, 'secret': None, 'webhook_id': '558fde83113d48024a427ccf004e2d2bdf7c56646c6a5a953566c272d51f1bfc'})
webhook_client = <aiohttp.test_utils.TestClient object at 0x7ffe4e640ca0>

    async def test_webhook_handle_get_config(hass, create_registrations, webhook_client):
        """Test that we can get config properly."""
        resp = await webhook_client.post(
            "/api/webhook/{}".format(create_registrations[1]["webhook_id"]),
            json={"type": "get_config"},
        )

        assert resp.status == 200

        json = await resp.json()
        if "components" in json:
            json["components"] = set(json["components"])
        if "allowlist_external_dirs" in json:
            json["allowlist_external_dirs"] = set(json["allowlist_external_dirs"])

        hass_config = hass.config.as_dict()

        expected_dict = {
            "latitude": hass_config["latitude"],
            "longitude": hass_config["longitude"],
            "elevation": hass_config["elevation"],
            "unit_system": hass_config["unit_system"],
            "location_name": hass_config["location_name"],
            "time_zone": hass_config["time_zone"],
            "components": hass_config["components"],
            "version": hass_config["version"],
            "theme_color": "#03A9F4",  # Default frontend theme color
        }

>       assert expected_dict == json
E       AssertionError: assert {'components'...st home', ...} == {'components'...st home', ...}
E         Omitting 8 identical items, use -vv to show
E         Differing items:
E         {'theme_color': '#03A9F4'} != {'theme_color': 'blue'}
E         Use -v to get the full diff

tests/components/mobile_app/test_webhook.py:231: AssertionError
@mweinelt mweinelt merged commit 6a5c85e into NixOS:master May 17, 2021
@mweinelt mweinelt deleted the home-assistant branch May 17, 2021 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants