Commit Graph

15531 Commits

Author SHA1 Message Date
Martin Hauser bcb9a83c46 fix(core): Handle empty release list in check_for_new_releases
Guard max(releases) against an empty iterable to prevent a ValueError
when the release-check endpoint returns only prereleases, dev releases,
or entries lacking a tag_name.

Fixes #22202
2026-05-18 08:29:45 -04:00
Jeremy Stretch bad4cc70be
Update PR template (#22218) 2026-05-15 16:56:49 -05:00
Martin Hauser 521bc44c40
fix(core): Add explicit user_id and user filters to JobFilterSet
Adds the missing user_id companion filter (by ID) and an explicit
user filter (by username), mirroring the ObjectChangeFilterSet
pattern.

Fixes #22208
2026-05-15 21:20:42 +02:00
bctiemann a65afe7eaf
Merge pull request #22201 from netbox-community/22125-extend-test-coverage-of-background-jobs
Closes #22125: Add test coverage for system housekeeping, data source sync, and script jobs
2026-05-15 13:07:25 -04:00
bctiemann 55b2c6e0a8
Merge pull request #22193 from netbox-community/22124-add-tests-for-management-commands
Closes #22124: Add test coverage for custom management commands
2026-05-15 13:06:10 -04:00
bctiemann 6df7298b58
Merge pull request #22184 from netbox-community/22098-add-tests-for-signal-handlers
Closes #22098: Add signal handler test coverage
2026-05-15 13:04:08 -04:00
github-actions 517108a559 Update source translation strings 2026-05-15 06:11:07 +00:00
Jeremy Stretch 5b5cd36cae
Closes #22058: Remove redundant declarations on SiteType (#22203) 2026-05-14 13:39:29 -07:00
Martin Hauser d2545c4bda
docs(plugin): Update plugin installation examples (#22185) 2026-05-14 13:36:00 -07:00
Martin Hauser 7fb061c4d1
test(jobs): Add comprehensive test coverage for job runners
Add test suites for SystemHousekeepingJob, SyncDataSourceJob, and
ScriptJob covering housekeeping tasks, data source synchronization,
script rollback paths, and request processor integration.

Includes helpers to safely instantiate runners without accumulating
log handlers across tests, plus a DummyScript test double.

Fixes #22125
2026-05-14 18:17:50 +02:00
Martin Hauser 919817e255
Closes #14914: Add test for automatic plugin dashboard widget registration (#22191) 2026-05-14 10:28:31 -05:00
Jeremy Stretch 329c041224
Closes #22192: Introduce HTTP_CLIENT_IP_HEADERS configuration parameter (#22197) 2026-05-14 17:04:30 +02:00
Jeremy Stretch d4408f3d5d
Closes #22198: Restrict ExportTemplate querysets for UI & REST API (#22199) 2026-05-14 09:42:12 -05:00
Martin Hauser 0a49618297
test(commands): Add comprehensive tests for management commands
Add test coverage for Django management commands across core, dcim,
extras, ipam, and utilities apps.
Tests verify command argument handling, error cases, and integration
with mocked dependencies using patches and test doubles.

Fixes #22124
2026-05-14 15:58:31 +02:00
Martin Hauser 71d0352a7c
Fixes #22195: Align continuation-line indentation in attrs.py docstrings (#22196)
Bump under-indented continuation lines in the Parameters sections of
RelatedObjectAttr, GenericForeignKeyAttr, and AddressAttr so griffe's
Google parser (used by zensical) no longer warns about confusing
indentation. Whitespace-only change; no rendered output differs.
2026-05-14 15:36:32 +02:00
Jason Novinger d124c5fe86 Fixes #22079: Restrict environment_params to an allowlist of permitted keys
Replace JINJA_ENV_PARAMS_WITH_PATH_IMPORT with JINJA_ENV_PARAMS_ALLOWED,
a whitelist of permitted Jinja2 Environment parameters. Unknown keys are
rejected by clean() and stripped at render time.

The undefined parameter resolves values via direct class mapping instead
of import_string(). The finalize parameter is deprecated and blocked
from new use via clean(); existing stored values continue to resolve via
import_string() to preserve backward compatibility. No data migrations.
2026-05-14 08:14:59 -04:00
Martin Hauser 8c67d2449a fix(wireless): Correct attribute check in WirelessLink signal handler
Fix typo in post_save signal checking `interface_b.cable` instead of
`interface_b.wireless_link`, preventing unnecessary re-saves.
Add regression test verifying interfaces aren't logged on link re-save.

Fixes #22183
2026-05-14 08:07:38 -04:00
Martin Hauser f66e6f360a feat(ipam): Allow single-address IP Ranges
Allow IP ranges where start_address equals end_address to model
single-IP pools like DHCP or NAT reservations. Add validation tests,
filterset coverage, and display logic to render both endpoints.

Fixes #21993
2026-05-14 08:05:51 -04:00
Laurent Stéphenne df5bc85b48
Closes #20808: Show occupying Device in Rack Position Selector (#21744)
Add a description field to the rack unit serializer containing the
occupying Device, allowing the Rack position dropdown to show Device
context while keeping the existing display value unchanged.

Co-authored-by: Martin Hauser <mhauser@netboxlabs.com>
2026-05-14 13:22:56 +02:00
github-actions 9b5f29af23 Update source translation strings 2026-05-14 06:05:35 +00:00
bctiemann 77dc7104c7
Merge pull request #22147 from netbox-community/22146-modulebay-mptt-improvements
Closes #22146: Avoid renumbering MPTT trees when creating module bays
2026-05-13 20:52:43 -04:00
Arthur Hanson 7a3397798a
Fixes #16851: Add missing Aria Labels (#22178)
* #16851 - Add missing Aria Labels

* #16851 - Add missing Aria Labels

* #16851 - Add missing Aria Labels

* fixes for form field labels

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup
2026-05-13 16:38:30 -05:00
Martin Hauser e60ba2859d
test(signals): Add signal handler test coverage
Add comprehensive test coverage for signal handlers in circuits, core,
dcim, extras, ipam, users, virtualization, and wireless, including
cable path rebuilding, change logging, data source sync, scope
propagation, and notification dispatch logic.

Fixes #22098
2026-05-13 18:06:07 +02:00
Jeremy Stretch eeca184cb8
Closes #22057: Add GraphQL filters for notifications and subscriptions (#22175) 2026-05-13 08:45:59 -07:00
Jeremy Stretch 0ee59d7371
Closes #22081: Include plaintext when creating v2 tokens via REST API (#22160) 2026-05-13 08:38:17 -07:00
Jeremy Stretch b1412514f1
Closes #22104: Avoid retracing paths when deleting Cables (#22167) 2026-05-13 15:50:32 +02:00
Jeremy Stretch baeead1718 Closes #22146: Avoid renumbering MPTT trees when creating module bays 2026-05-12 10:05:31 -04:00
bctiemann b2a1e94508
Merge pull request #22157 from netbox-community/22061-graphql-hints
Closes #22061: Add prefetch hints for GraphQL types
2026-05-12 09:19:13 -04:00
bctiemann 1eeb54d052
Merge pull request #22145 from netbox-community/more-claude-skills
Introduce additional Claude skills
2026-05-12 09:03:00 -04:00
github-actions 7b948af4b6 Update source translation strings 2026-05-12 06:01:27 +00:00
Jeremy Stretch c27c470499
Closes #19971: Expand test coverage for config & export templates (#22164) 2026-05-11 23:29:51 +02:00
Martin Hauser 963306f338 refactor(tests): Standardize test class naming to TestCase suffix
Rename all test classes from `*Test` to `*TestCase` for consistency with
Django conventions.

Fixes #22097
2026-05-11 16:42:05 -04:00
Jeremy Stretch 2e9c3119ce
Closes #22060: Introduce a config parameter to enforce GraphQL maximum query depth (#22162) 2026-05-11 19:54:07 +02:00
Jeremy Stretch da9568b548 Closes #22061: Add prefetch hints for GraphQL types 2026-05-11 08:33:19 -04:00
Martin Hauser 3e4ad4a5da chore(ci): Collect static files before running tests
Copy frontend-generated files into STATIC_ROOT before tests run so SVG
rendering tests can read their CSS directly.
Also add pull-requests read permission to the workflow.

Fixes #22150
2026-05-11 08:28:01 -04:00
Martin Hauser cd56523cc5 chore(ci): Limit CI push trigger to main and feature
Restrict the CI workflow's push trigger to the main and feature branches
while preserving the existing paths-ignore filters.

This avoids unnecessary push-triggered CI runs on topic branches without
changing pull request workflow behavior.

Fixes #19324
2026-05-08 08:06:34 -04:00
Arthur Hanson bf23a0b3fd
Fixes #22055: Report API exceptions to Monitoring Services (#22106)
Ensure CoreMiddleware emits Django's got_request_exception signal before
returning handled 500 responses for API requests and custom error templates.

This allows integrations such as Sentry to report exceptions that would
otherwise be hidden when middleware returns a custom error response.
2026-05-08 13:59:44 +02:00
Jeremy Stretch 523ecba867
Closes #22114: Split CI into conditional jobs (#22126) 2026-05-08 09:35:46 +02:00
github-actions 6926580124 Update source translation strings 2026-05-08 05:41:23 +00:00
Martin Hauser 770c3647fb feat(ui): Add nested breadcrumb display for GenericForeignKey attrs
Add `nested` and `max_depth` params to GenericForeignKeyAttr to render
hierarchical objects as breadcrumbs when they expose `get_ancestors()`.
Applied to scope fields in IPAM/wireless and circuit termination points.

Fixes #21938
2026-05-07 14:35:59 -04:00
Arthur Hanson c45482c4af
#21934 allow highlight override table stripping (#22018) 2026-05-07 14:33:03 -04:00
Jeremy Stretch 670386ed72 Address PR feedback 2026-05-07 14:26:43 -04:00
Jeremy Stretch 9db8c207a2 Add Claude skills to add and removing config parameters 2026-05-07 13:39:05 -04:00
Jeremy Stretch 3d0308a95f Add Claude skills for removing models & fields 2026-05-07 13:28:38 -04:00
Jason Novinger c20e6dd2ee
Closes #20776: Add changelog message to bulk rename process (#22100)
Add changelog message support to BulkRenameView for models that support
change logging. Introduce NetBoxModelBulkRenameForm as a changelog-aware
wrapper around the existing utilities.forms.BulkRenameForm, preserving the
existing import path while avoiding circular imports.

Set _changelog_message before saving renamed objects in both MPTT and
non-MPTT rename paths, and add a regression test to verify that the
submitted message is recorded on the resulting ObjectChange records.

Remove unused VMInterfaceBulkRenameForm and VirtualDiskBulkRenameForm,
along with their unused view references, since BulkRenameView constructs
its form dynamically.
2026-05-07 18:23:00 +02:00
Jeremy Stretch f2187ceb8f
Closes #22102: Add a GIN index on CablePath to optimize filtering of cable paths by node (#22144) 2026-05-07 11:22:14 -05:00
Jeremy Stretch 088de70b10
Remove prohibition on AI-generated PRs and add guidance to AGENTS.md (#22133) 2026-05-07 18:13:02 +02:00
Jeremy Stretch 2703ff98a3
Closes #22128: Deprecate v1 API tokens (#22143)
Display a warning in the UI whenever a user goes to provision a v1
token (both via the admin token form and the user profile token form).
Update documentation to note that v1 tokens are deprecated and will be
removed in NetBox v5.0.
2026-05-07 08:48:25 -07:00
Jeremy Stretch 734a69c9a7
Closes #22141: Deprecate support for PostgreSQL 14 (#22142) 2026-05-07 17:14:02 +02:00
Jeremy Stretch e50aff8736
Documentation cleanup (#22127) 2026-05-06 16:58:08 -05:00