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

fix(hue): Various nil index crashes for "stale" devices #1879

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

Conversation

dljsjr
Copy link
Contributor

@dljsjr dljsjr commented Jan 16, 2025

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

The recent release that un-stuck the onboarding of multi-component devices has revealed that there are several setups on the platform where users have "stale" multi-component devices in their inventories. These devices appear to no longer be joined to the Hue Bridge topology (perhaps they were deleted then re-onboarded), but have not been deleted from the Edge Driver. We're not sure what causes this yet, but we have seen it happen rarely. These crashes can impede proper driver functionality, as well as preventing cleanup code that could fix the inconsistent state from executing.

It's unclear how hubs ended up in this state, and it is difficult to reproduce. So this PR avoids crashing the driver when devices are in this state, so that the driver or the user will at least have some opportunity to attempt cleanup.

Summary of Completed Tests

Copy link

Copy link

Test Results

   64 files  ±0    404 suites  ±0   0s ⏱️ ±0s
2 009 tests ±0  2 009 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 471 runs  ±0  3 471 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 6755553. ± Comparison against base commit ad6cc1c.

Copy link

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 6755553

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

Successfully merging this pull request may close these issues.

1 participant