Skip to content

e2e: add DPS leak checks - #1263

Merged
Carter Tinney (cartertinney) merged 2 commits into
mainfrom
agents/add-dps-leak-checks
Sep 3, 2026
Merged

e2e: add DPS leak checks#1263
Carter Tinney (cartertinney) merged 2 commits into
mainfrom
agents/add-dps-leak-checks

Conversation

@cartertinney

@cartertinney Carter Tinney (cartertinney) commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • add automatic SDK/Paho leak checking to every DPS E2E test
  • run the check after each test frame is released, when successful registration has already shut down the provisioning pipeline
  • keep the tracker setup local to the DPS suite without modifying IoT Hub leak configuration

Why

DPS registration creates MQTT pipelines and background resources but previously had no leak coverage. Successful register() calls implicitly shut down their pipeline, so a strict post-test check can detect resources that survive registration without needing IoT Hub's separate pre/post-shutdown trackers.

DPS uses no replacement-object suppression: every DPS client is created after the baseline, so suppressing one replacement object would hide a real leak.

Validation

  • uv run --no-sync pytest tests (5,448 passed, 6 skipped)
  • collected all 24 DPS E2E variants (sync/async, symmetric/X.509, MQTT/MQTTWS)
  • collected all 119 IoT Hub E2E variants (94 selected, 25 deselected)
  • exercised strict local pipeline shutdown for sync/async MQTT/MQTTWS DPS clients without leaks
  • Ruff, Black, and git diff --check passed

Live DPS registration requires CI credentials and is delegated to the DPS E2E pipeline.

Run strict SDK and Paho leak tracking after every DPS registration test. Share tracker construction with the IoT Hub suite while preserving its existing false-positive filter.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the shared tracker factory and leave the existing IoT Hub setup untouched. The DPS conftest now configures its LeakTracker directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cartertinney
Carter Tinney (cartertinney) merged commit e9a4b55 into main Sep 3, 2026
41 checks passed
@cartertinney
Carter Tinney (cartertinney) deleted the agents/add-dps-leak-checks branch September 3, 2026 18:07
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.

2 participants