Trigger dependency sync#100
Conversation
|
Hey @benjofalanga, Thanks for putting this together; trigger dependency sync based on NetBox cabling is a genuinely useful feature and it's clear you've thought through the design (level ordering, managed vs. unmanaged dependency preservation, cross-server guard, idempotency check before calling trigger.update). Appreciate the effort! That said, I'd like to ask you to split this PR up before I can merge it. Right now it mixes the actual feature with a bunch of unrelated changes, which makes it hard for me to review confidently. Please remove from this PR:
What should stay:What I consider the actual feature scope, so:
A few code-level notes for the feature itself once it's isolated:
So in summary: please split the PR into
Let me know if you're willing to do this; if not I would like to ask if I may reuse your code and work on this? Thanks again for the contribution! |
Hey @bvbaekel , Thanks for the detailed review. Yes, I’m happy to split this up. I’ll clean this PR so it only contains the trigger dependency feature, remove the .gitignore and egg-info artifacts, and revert the unrelated docs/style changes. I’ll keep only the docs that directly describe the new trigger_dependencies feature. I’ll also adjust the default role list to be generic, remove the redundant enabled check, and look into reusing Zabbix connections plus optimizing the connected-device lookup. After that I’ll push an updated branch for review. The docs/style cleanup can be handled separately if needed. |
|
Hey @bvbaekel , Scope cleanupRemoved from this PR:
The PR now only includes the trigger dependency implementation, related tests, and the relevant Code review feedback addressed
ValidationI tested the cleaned implementation with focused Django tests: manage.py test nbxsync.tests.utils.test_trigger_dependency_sync nbxsync.tests.jobs.test_synchost nbxsync.tests.test_plugin_settingsResult: I also ran the repo’s Ruff format check: ruff format --check ./nbxsyncResult: Manual behavior testI restored a NetBox/Zabbix test dataset and enabled trigger dependencies locally. For switch
Follow-upI left the configuration in |
Summary
This adds optional Zabbix trigger dependency synchronization based on NetBox cabling.
When enabled, nbxSync can update trigger dependencies after a successful device host sync. The feature uses:
The default hierarchy is: