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

Make restart logic progressive and other small fixes #1129

Merged
merged 7 commits into from
Jul 1, 2024

Conversation

helto4real
Copy link
Collaborator

@helto4real helto4real commented Jun 30, 2024

Breaking change

Proposed change

Fixes in this PR:

Progressive reconnect timeouts

To avoid too many tries it will increase the timeout per retry by a factor 2 starting with 5 seconds and max 80 seconds.

The registry updated log will now be a debug log

Recent versions of HA updates the registries more often and possible flooding the outputlog. This log is now made a debug log instead.

Fix the problem that the correct version does not show on start

The github action that push to Nuget did not successfully updated version information. The default message also changed to reflect the actual behaviour. The version is not known when using a local built NetDaemon runtime. The version will then be local build. Offical built versions will show the correct version.

Small fixes in restart logic

  • The runtime stops when NetDaemon not able to authorize the token. This is same behavior as before but now the runtime shuts down too.
  • Do not show timeout information on disconnect since this is also shown in the reconnect loop

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • The code compiles without warnings (code quality check)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration are added/changed:

@helto4real
Copy link
Collaborator Author

The CI is failing due to a deprecated call that been removed in the beta. Another pr fixes this.

@helto4real helto4real marked this pull request as ready for review June 30, 2024 08:01
@helto4real helto4real force-pushed the make-restart-logic-progressive branch from 0303167 to bbe824b Compare July 1, 2024 02:13
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.

Project coverage is 81%. Comparing base (0dac395) to head (234c6ed).

Files Patch % Lines
...ime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs 50% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1129   +/-   ##
====================================
  Coverage    81%     81%           
====================================
  Files       190     191    +1     
  Lines      3843    3865   +22     
  Branches    462     464    +2     
====================================
+ Hits       3142    3162   +20     
- Misses      520     521    +1     
- Partials    181     182    +1     
Flag Coverage Δ
unittests 81% <89%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@helto4real helto4real enabled auto-merge (squash) July 1, 2024 02:25
@helto4real helto4real merged commit 089f848 into main Jul 1, 2024
7 checks passed
@helto4real helto4real deleted the make-restart-logic-progressive branch July 1, 2024 04:10
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.

3 participants