Skip to content

Conversation

ltucker
Copy link
Contributor

@ltucker ltucker commented Jul 23, 2025

  • Adds compatibility with additional NetBox 4.3+ types and fields
    • supports dcim.ModuleTypeProfile
    • supports extras.CustomField
    • supports extras.CustomFieldChoiceSet
    • supports extras.CustomLink
    • supports extras.JournalEntry
  • Adds reasonable errors and warnings for incompatible types and fields
  • Improved compatibility, tests and fixes for existing fields and types
  • Simplifies supported model discovery
  • Adjusts tests and Docker to run NetBox v4.3 by default
    • runs prior tests on v4.2 in CI

Note: use of new types and fields also requires updated SDKs and diode backend, but
this remains compatible with existing versions.

etc

This pull request introduces support for testing the plugin against multiple NetBox versions, including the addition of version-specific configurations and updates to dependencies. It also upgrades the default NetBox version to v4.3.3-3.3.0 and adjusts the Makefile and Docker configurations to accommodate these changes.

Support for Multiple NetBox Versions:

  • Added a matrix.netbox strategy in .github/workflows/lint-tests.yml to test against multiple NetBox versions ("" and "v4.2.3"). ([.github/workflows/lint-tests.ymlR29](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-7ff5b316f9a4896dcea6d970dc3df6d670c4b14744a5d6e3ae19358ce6835dfcR29))
  • Updated the Makefile to dynamically adjust paths and test selectors based on the NETBOX_VERSION environment variable. ([MakefileR7-R45](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R7-R45))
  • Introduced version-specific Docker configurations under docker/v4.2.3/, including Dockerfile-diode-netbox-plugin, docker-compose.yaml, and docker-compose.test.yaml. These configurations ensure compatibility with NetBox v4.2.3. ([[1]](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-bc3e6e5a551c159d4974cdeca53254ccc557f38765f953e49374df6f315d881cR1-R12), [[2]](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-557425242a4ba38afdb72eba8fcf8b3a501fc3a8aca3e61e7fd731bd6fca4122R1-R5), [[3]](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-2efe46e43c32c87fa317522d238ab02c6ba209f284cc381995cb5779acaa9d5fR1-R92))

Dependency and Version Updates:

  • Upgraded the default NetBox version in docker/Dockerfile-diode-netbox-plugin and docker/docker-compose.yaml to v4.3.3-3.3.0. ([[1]](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-112ee4e06e4a556534c26208d1566b12ae5a6fcf415f8e9d465c6f5d78ebc4ebL1-R1), [[2]](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-89fafc265c1fa601cf2364b20be83308031335fda9467fcf3249d5ec1c0c8172L4-R4))
  • Updated the netboxlabs-netbox-branching dependency in docker/requirements-diode-netbox-plugin.txt from 0.5.7 to 0.6.0. ([docker/requirements-diode-netbox-plugin.txtL7-R7](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-3b478cf01739a25e40b5657b8e5034cbeaa862a413b355e1f0357cad61a471a7L7-R7))

Build and Test Improvements:

  • Modified the test command in .github/workflows/lint-tests.yml to pass the NETBOX_VERSION dynamically to the Makefile. ([.github/workflows/lint-tests.ymlL50-R51](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-7ff5b316f9a4896dcea6d970dc3df6d670c4b14744a5d6e3ae19358ce6835dfcL50-R51))
  • Adjusted the Dockerfile to use the uv tool for dependency installation and set the VIRTUAL_ENV environment variable for better compatibility. ([docker/Dockerfile-diode-netbox-pluginL12-R13](https://github.com/netboxlabs/diode-netbox-plugin/pull/122/files#diff-112ee4e06e4a556534c26208d1566b12ae5a6fcf415f8e9d465c6f5d78ebc4ebL12-R13))

@ltucker ltucker marked this pull request as draft July 23, 2025 02:52
@ltucker ltucker force-pushed the support_v43_updates branch from 79907c7 to 967a9f0 Compare July 23, 2025 03:09
Copy link

github-actions bot commented Jul 23, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3893 3515 90% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
netbox_diode_plugin/api/common.py 88% 🟢
netbox_diode_plugin/api/compat.py 78% 🟢
netbox_diode_plugin/api/differ.py 91% 🟢
netbox_diode_plugin/api/matcher.py 88% 🟢
netbox_diode_plugin/api/plugin_utils.py 83% 🟢
netbox_diode_plugin/api/supported_models.py 90% 🟢
netbox_diode_plugin/api/transformer.py 94% 🟢
netbox_diode_plugin/api/views.py 77% 🟢
netbox_diode_plugin/management/commands/generate_matching_docs.py 88% 🟢
netbox_diode_plugin/tests/test_api_apply_change_set.py 99% 🟢
netbox_diode_plugin/tests/test_api_diff_and_apply.py 100% 🟢
netbox_diode_plugin/tests/test_generate_matching_docs.py 100% 🟢
TOTAL 90% 🟢

updated for commit: df93375 by action🐍

@ltucker ltucker marked this pull request as ready for review July 23, 2025 03:47
Copy link
Member

@mfiedorowicz mfiedorowicz left a comment

Choose a reason for hiding this comment

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

👏

@ltucker ltucker merged commit 3d4c27e into develop Jul 23, 2025
7 checks passed
@ltucker ltucker deleted the support_v43_updates branch July 23, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants