Skip to content

Conversation

@ltucker
Copy link
Contributor

@ltucker ltucker commented Apr 24, 2025

This pull request introduces updates to the netbox_diode_plugin to enhance fingerprinting functionality and improve testing coverage. The most significant changes include modifying the _fingerprint_all function to handle object types, updating its usage in the fingerprints function, and adding a new test case to ensure proper deduplication of changes across different object types.

Enhancements to fingerprinting functionality:

  • Modified _fingerprint_all in netbox_diode_plugin/api/matcher.py to accept an optional object_type parameter, which is included in the fingerprint calculation. This ensures that fingerprints account for the object type, improving uniqueness. [1] [2]
  • Updated the fingerprints function to pass the object_type parameter when calling _fingerprint_all, ensuring consistent behavior across the fingerprinting process.

Improvements to testing:

  • Added a new test case, test_generate_diff_dedupe_different_object_types, in netbox_diode_plugin/tests/test_api_generate_diff.py. This test verifies that the system correctly deduplicates changes for different object types with the same values, ensuring accurate change tracking.
  • Imported defaultdict in the test file to support the new test case.

@github-actions
Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2812 2618 93% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
netbox_diode_plugin/api/matcher.py 88% 🟢
netbox_diode_plugin/tests/test_api_generate_diff.py 100% 🟢
TOTAL 94% 🟢

updated for commit: 203ef34 by action🐍

@ltucker ltucker merged commit 65c16f3 into develop Apr 24, 2025
6 checks passed
@ltucker ltucker deleted the fix_dedupe_type branch April 24, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants