Skip to content

fix: delete device integrations after device deletion#872

Open
jona159 wants to merge 2 commits intodevfrom
fix/delete-integrations-after-device-deletion
Open

fix: delete device integrations after device deletion#872
jona159 wants to merge 2 commits intodevfrom
fix/delete-integrations-after-device-deletion

Conversation

@jona159
Copy link
Copy Markdown
Contributor

@jona159 jona159 commented Apr 7, 2026

Type of Change

  • Dependency upgrade
  • Bug fix (non-breaking change)
  • Breaking change
    • e.g. a fixed bug or new feature that may break something else
  • New feature
  • Code quality improvements
    • e.g. refactoring, documentation, tests, tooling, ...

Implementation

Checklist

  • I gave this pull request a meaningful title
  • My pull request is targeting the dev branch
  • I have added documentation to my code
  • I have deleted code that I have commented out

Additional Information

  • This PR closes #

@jona159 jona159 linked an issue Apr 7, 2026 that may be closed by this pull request
3 tasks
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 68.99% 1751 / 2538
🔵 Statements 67.31% 1823 / 2708
🔵 Functions 69.42% 361 / 520
🔵 Branches 56% 947 / 1691
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
app/models/integration.server.ts 8% 7.14% 25% 4.16% 6-12, 18-85
Generated in workflow #2360 for commit 31ea3c9 by the Vitest Coverage Report Action

Comment on lines +248 to +253
if (failedDeletions.length > 0) {
console.error('Failed to delete one or more integrations before device deletion', {
deviceID,
failedDeletions,
})
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Won't this inevitably produce problems when we still delete the device but not the integration?
As long as we won't proactively monitor such logs, we would be producing dead integrations..

I am not sure whats the right way to go forward it, just want to discuss. Should be break the device deletion process here as well? That way we probably get to know about a problem faster?

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.

MQTT Integration is not deleted when a device is deleted

2 participants