Skip to content

Closes: #204 - NetBox 4.6.3+ compatibility#205

Merged
DanSheps merged 1 commit into
DanSheps:mainfrom
marcinpsk:fix/netbox-4.6-compat
Jul 15, 2026
Merged

Closes: #204 - NetBox 4.6.3+ compatibility#205
DanSheps merged 1 commit into
DanSheps:mainfrom
marcinpsk:fix/netbox-4.6-compat

Conversation

@marcinpsk

@marcinpsk marcinpsk commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Closes: #204 - NetBox 4.6.3+ compatibility

CI should get green
netbox_routing/tests/query_counts.json - need to generate it in ISIS PR

…ines)

Self-contained compatibility fixes for NetBox 4.6.3/4.6.4. The trigger
for the GraphQL changes is NetBox 4.6.3's rewritten GraphQL filter test
framework (netbox-community/netbox#22384) - not the concurrent
strawberry-graphql-django 0.85 -> 0.86 bump, which did not change
filter field collection.

- Decorate the GraphQL filter mixins with @DataClass. strawberry's
  dataclass-based field collection has never picked up fields declared
  on plain (non-dataclass) mixin bases - verified under 0.85.0, 0.86.1
  and 0.86.4 alike - so the device/vrf/interface/network filter fields
  were silently missing from the schema all along. NetBox 4.6.3's new
  auto-generated filter tests walk the filter class's MRO annotations
  (which do see plain mixins) and query those fields, exposing the
  latent gap. NetBox core decorates its own filter mixins with
  @DataClass for the same reason.
- Narrow OSPFInstance.router_id and StaticRoute.next_hop GraphQL
  filters to BaseFilterLookup. Both are IPAddressField (inet)-backed;
  StrFilterLookup advertises substring lookups (i_ends_with, ...)
  whose ORM-side expected set is empty for inet columns, and the new
  test framework hard-fails empty expected sets as tautological.
  Fields typed BaseFilterLookup are skipped by the auto-emitter.
- Record query-count baselines for list-view tests
  (assert_expected_query_count).
@DanSheps DanSheps changed the title fix: NetBox 4.6.3+ compatibility Closes: #204 - NetBox 4.6.3+ compatibility Jul 15, 2026
@DanSheps
DanSheps self-requested a review July 15, 2026 01:24
@DanSheps
DanSheps enabled auto-merge July 15, 2026 01:25
@DanSheps
DanSheps merged commit 9ca141b into DanSheps:main Jul 15, 2026
6 checks passed
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.

CI fails on 4.6.3+

2 participants