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

Device#Show page starts health checks instead of relying on extension #1939

Closed
jjcarstens opened this issue Mar 4, 2025 · 2 comments
Closed

Comments

@jjcarstens
Copy link
Collaborator

The device show page still schedules health checks to be run despite that now being an extension.

Also, if the device has the extension enabled but the product has disabled the health extension, it still attempts to get health checks for a device which results in errors like these on device:

17:31:55.040 [error] GenServer NervesHubLink.Extensions terminating
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: invalid destination

    (erts 15.2) :erlang.send(NervesHubLink.Extensions.Health, {:__extension_event__, "check", %{}})
    (nerves_hub_link 2.6.0) lib/nerves_hub_link/extensions/extensions.ex:206: NervesHubLink.Extensions.handle_cast/2
    (stdlib 6.2) gen_server.erl:2371: :gen_server.try_handle_cast/3
    (stdlib 6.2) gen_server.erl:2433: :gen_server.handle_msg/6
    (stdlib 6.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:handle_event, "health:check", %{}}}
State: %{extensions: %{"geo" => %{module: NervesHubLink.Extensions.Geo, version: "0.0.1", attached?: false, attach_ref: nil}, "health" => %{module: NervesHubLink.Extensions.Health, version: "0.0.1", attached?: false, attach_ref: nil}}}

I believe we need to remove the health check scheduling from the UI or at the very least ensure it is checking both the product and device level setting

joshk added a commit that referenced this issue Mar 4, 2025
We were checking the device extension settings, but not the product.

Part 1 of #1939
@nshoes
Copy link
Contributor

nshoes commented Mar 5, 2025

Fixed in #1940

@nshoes nshoes closed this as completed Mar 5, 2025
@jjcarstens
Copy link
Collaborator Author

Sorry Nate, we forgot to comment. We wanted to keep this open for part 2 which is to move the duplicated health check scheduling out of the view and keep within the extension.

The PR was an initial quick fix so it wouldn't poll when it is disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants