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

CHAD-14284: Test zigbee health monitoring opt out with zigbee-motion and zigbee-contact drivers #1816

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kiera-robinson-st
Copy link
Contributor

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

Changed health check action for 2 drivers and their associated tests: zigbee-motion and zigbee-contact

Summary of Completed Tests

This is not needed to keep device online, and so its being removed to gain the small memory/latency savings of having it disabled. Overnight tests were done for both zigbee-motion and zigbee-contact drivers.

Copy link

github-actions bot commented Dec 10, 2024

Test Results

   64 files    402 suites   0s ⏱️
2 001 tests 2 001 ✅ 0 💤 0 ❌
3 453 runs  3 453 ✅ 0 💤 0 ❌

Results for commit 6ce6cc3.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 10, 2024

zigbee-contact_coverage.xml

File Coverage
All files 99%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/smartsense-multi/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/multi-sensor/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/init.lua 98%

zigbee-motion-sensor_coverage.xml

File Coverage
All files 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/smartsense-multi/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/multi-sensor/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-motion-sensor/src/aqara/aqara_utils.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-motion-sensor/src/aqara/init.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-motion-sensor/src/gatorsystem/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-motion-sensor/src/ikea/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-motion-sensor/src/thirdreality/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-motion-sensor/src/init.lua 98%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 6ce6cc3

@cjswedes
Copy link
Contributor

Looks like there is a test for zigbee-motion that was actually testing the healthcheck functionality. Since we are removing the functionality, we can just remove the test.

@@ -31,7 +31,7 @@ local mock_device = test.mock_device.build_test_zigbee_device(
zigbee_test_utils.prepare_zigbee_env_info()
local function test_init()
test.mock_device.add_test_device(mock_device)
zigbee_test_utils.init_noop_health_check_timer()
--zigbee_test_utils.init_noop_health_check_timer() removal due to change to stop health checks going forward
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the health check disable is happening in the base driver, we will need to remove this test config from all of the tests in the test/ folder, not just this test. The same for the motion driver.

…and zigbee-contact drivers; commented out `--zigbee_test_utils.init_noop_health_check_timer()` in test config from all tests for Zigbee motion sensor and Zigbee contact sensor
…and zigbee-contact drivers; commented out any tests that involved health checking
@cjswedes
Copy link
Contributor

FYI, I think we should hold off merging this for a little bit, so that it ends up going to production after the new year. I will have more time to monitor the heavily used drivers then. cc: @varzac

@kiera-robinson-st2
Copy link

Merging is held off as per @varzac and @cjswedes call.

TS: Wednesday, December 11, 2024 at 2:40:48 PM ET

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

5 participants