Skip to content

Commit 9c7f2ec

Browse files
Merge pull request #18064 from netbox-community/develop
Release v4.1.7
2 parents 58bc388 + 3b3990a commit 9c7f2ec

File tree

65 files changed

+10147
-10251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+10147
-10251
lines changed

Diff for: .github/ISSUE_TEMPLATE/01-feature_request.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: NetBox version
1616
description: What version of NetBox are you currently running?
17-
placeholder: v4.1.6
17+
placeholder: v4.1.7
1818
validations:
1919
required: true
2020
- type: dropdown

Diff for: .github/ISSUE_TEMPLATE/02-bug_report.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ body:
3939
attributes:
4040
label: NetBox Version
4141
description: What version of NetBox are you currently running?
42-
placeholder: v4.1.6
42+
placeholder: v4.1.7
4343
validations:
4444
required: true
4545
- type: dropdown

Diff for: .github/workflows/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
permissions:
1616
contents: read
1717

18+
# Add concurrency group to control job running
19+
concurrency:
20+
group: ${{ github.event_name }}-${{ github.ref }}-${{ github.actor }}
21+
cancel-in-progress: true
22+
1823
jobs:
1924
build:
2025
runs-on: ubuntu-latest

Diff for: .tx/config

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[main]
2+
host = https://app.transifex.com
3+
4+
[o:netbox-community:p:netbox:r:9cbf4fcf95b3d92e4ebbf1a5e5d1caee]
5+
file_filter = netbox/translations/<lang>/LC_MESSAGES/django.po
6+
source_file = netbox/translations/en/LC_MESSAGES/django.po
7+
type = PO
8+
minimum_perc = 0
9+
resource_name = django.po
10+
replace_edited_strings = false
11+
keep_translations = false
12+

Diff for: base_requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ django-rich
4242

4343
# Django integration for RQ (Reqis queuing)
4444
# https://github.com/rq/django-rq/blob/master/CHANGELOG.md
45-
django-rq<3.0
45+
django-rq
4646

4747
# Abstraction models for rendering and paginating HTML tables
4848
# https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md
@@ -118,7 +118,7 @@ requests
118118

119119
# rq
120120
# https://github.com/rq/rq/blob/master/CHANGES.md
121-
rq<2.0
121+
rq
122122

123123
# Social authentication framework
124124
# https://github.com/python-social-auth/social-core/blob/master/CHANGELOG.md

Diff for: contrib/generated_schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@
329329
"100base-tx",
330330
"100base-t1",
331331
"1000base-t",
332+
"1000base-lx",
332333
"1000base-tx",
333334
"2.5gbase-t",
334335
"5gbase-t",

Diff for: docs/development/release-checklist.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,20 @@ This will automatically update the schema file at `contrib/generated_schema.json
9090

9191
### Update & Compile Translations
9292

93-
Updated language translations should be pulled from [Transifex](https://app.transifex.com/netbox-community/netbox/dashboard/) and re-compiled for each new release. Follow the documented process for [updating translated strings](./translations.md#updating-translated-strings) to do this.
93+
Updated language translations should be pulled from [Transifex](https://app.transifex.com/netbox-community/netbox/dashboard/) and re-compiled for each new release. First, retrieve any updated translation files using the Transifex CLI client:
94+
95+
```no-highlight
96+
tx pull
97+
```
98+
99+
Then, compile these portable (`.po`) files for use in the application:
100+
101+
```no-highlight
102+
./manage.py compilemessages
103+
```
104+
105+
!!! tip
106+
Consult the translation documentation for more detail on [updating translated strings](./translations.md#updating-translated-strings) if you've not set up the Transifex client already.
94107

95108
### Update Version and Changelog
96109

Diff for: docs/development/translations.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,31 @@ To update the English `.po` file from which all translations are derived, use th
1616

1717
Then, commit the change and push to the `develop` branch on GitHub. Any new strings will appear for translation on Transifex automatically.
1818

19+
!!! note
20+
It is typically not necessary to update source strings manually, as this is done nightly by a [GitHub action](https://github.com/netbox-community/netbox/blob/develop/.github/workflows/update-translation-strings.yml).
21+
1922
## Updating Translated Strings
2023

2124
Typically, translated strings need to be updated only as part of the NetBox [release process](./release-checklist.md).
2225

2326
Check the Transifex dashboard for languages that are not marked _ready for use_, being sure to click _Show all languages_ if it appears at the bottom of the list. Use machine translation to round out any not-ready languages. It's not necessary to review the machine translation immediately as the translation teams will handle that aspect; the goal at this stage is to get translations included in the Transifex pull request.
2427

25-
To update translated strings, start by initiating a sync from Transifex. From the Transifex dashboard, navigate to Settings > Integrations > GitHub > Manage, and click the **Manual Sync** button at top right.
28+
To download translated strings automatically, you'll need to:
2629

27-
![Transifex manual sync](../media/development/transifex_sync.png)
30+
1. Install the [Transifex CLI client](https://github.com/transifex/cli)
31+
2. Generate a [Transifex API token](https://app.transifex.com/user/settings/api/)
2832

29-
Enter a threshold percentage of 1 (to ensure all translations are captured) and select the `develop` branch, then click **Sync**. This will initiate a pull request to GitHub to update any newly modified translation (`.po`) files.
33+
Once you have the client set up, run the following command:
3034

31-
!!! tip
32-
The new PR should appear within a few minutes. If it does not, check that there are in fact new translations to be added.
35+
```no-highlight
36+
TX_TOKEN=$TOKEN tx pull
37+
```
3338

34-
![Transifex pull request](../media/development/transifex_pull_request.png)
39+
This will download all portable (`.po`) translation files from Transifex, updating them locally as needed.
3540

36-
Once the PR has been merged, the updated strings need to be compiled into new `.mo` files so they can be used by the application. Update the `develop` branch locally to pull in the changes from the Transifex PR, then run Django's [`compilemessages`](https://docs.djangoproject.com/en/stable/ref/django-admin/#django-admin-compilemessages) management command:
41+
Once retrieved, the updated strings need to be compiled into new `.mo` files so they can be used by the application. Run Django's [`compilemessages`](https://docs.djangoproject.com/en/stable/ref/django-admin/#django-admin-compilemessages) management command to compile them:
3742

38-
```nohighlight
43+
```no-highlight
3944
./manage.py compilemessages
4045
```
4146

Diff for: docs/media/development/transifex_pull_request.png

-108 KB
Binary file not shown.

Diff for: docs/media/development/transifex_sync.png

-42.4 KB
Binary file not shown.

Diff for: docs/models/vpn/ikepolicy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# IKE Policies
22

3-
An [Internet Key Exhcnage (IKE)](https://en.wikipedia.org/wiki/Internet_Key_Exchange) policy defines an IKE version, mode, and set of [proposals](./ikeproposal.md) to be used in IKE negotiation. These policies are referenced by [IPSec profiles](./ipsecprofile.md).
3+
An [Internet Key Exchange (IKE)](https://en.wikipedia.org/wiki/Internet_Key_Exchange) policy defines an IKE version, mode, and set of [proposals](./ikeproposal.md) to be used in IKE negotiation. These policies are referenced by [IPSec profiles](./ipsecprofile.md).
44

55
## Fields
66

Diff for: docs/release-notes/version-4.1.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# NetBox v4.1
22

3+
## v4.1.7 (FUTURE)
4+
5+
### Enhancements
6+
7+
* [#15239](https://github.com/netbox-community/netbox/issues/15239) - Enable adding/removing individual VLANs while bulk editing device interfaces
8+
* [#17871](https://github.com/netbox-community/netbox/issues/17871) - Enable the assignment/removal of virtualization cluster via device bulk edit
9+
* [#17934](https://github.com/netbox-community/netbox/issues/17934) - Add 1000Base-LX interface type
10+
* [#18007](https://github.com/netbox-community/netbox/issues/18007) - Hide sensitive parameters under data source view (even for privileged users)
11+
12+
### Bug Fixes
13+
14+
* [#17459](https://github.com/netbox-community/netbox/issues/17459) - Correct help text on `name` field of module type component templates
15+
* [#17901](https://github.com/netbox-community/netbox/issues/17901) - Ensure GraphiQL UI resources are served locally
16+
* [#17921](https://github.com/netbox-community/netbox/issues/17921) - Fix scheduling of recurring custom scripts
17+
* [#17923](https://github.com/netbox-community/netbox/issues/17923) - Fix the execution of custom scripts via REST API & management command
18+
* [#17963](https://github.com/netbox-community/netbox/issues/17963) - Fix selection of all listed objects during bulk edit
19+
* [#17969](https://github.com/netbox-community/netbox/issues/17969) - Fix system info export when a config revision exists
20+
* [#17972](https://github.com/netbox-community/netbox/issues/17972) - Force evaluation of `LOGIN_REQUIRED` when requesting static media
21+
* [#17986](https://github.com/netbox-community/netbox/issues/17986) - Correct labels for virtual machine & virtual disk size properties
22+
* [#18037](https://github.com/netbox-community/netbox/issues/18037) - Fix validation of maximum VLAN ID value when defining VLAN groups
23+
* [#18038](https://github.com/netbox-community/netbox/issues/18038) - The `to_grams()` utility function should always return an integer value
24+
25+
---
26+
327
## v4.1.6 (2024-10-31)
428

529
### Bug Fixes

Diff for: netbox/core/models/jobs.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from django.urls import reverse
1010
from django.utils import timezone
1111
from django.utils.translation import gettext as _
12+
from rq.exceptions import InvalidJobOperation
1213

1314
from core.choices import JobStatusChoices
1415
from core.models import ObjectType
@@ -158,7 +159,11 @@ def delete(self, *args, **kwargs):
158159
job = queue.fetch_job(str(self.job_id))
159160

160161
if job:
161-
job.cancel()
162+
try:
163+
job.cancel()
164+
except InvalidJobOperation:
165+
# Job may raise this exception from get_status() if missing from Redis
166+
pass
162167

163168
def start(self):
164169
"""

Diff for: netbox/core/tests/test_views.py

+30
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ def test_background_task_stop(self):
308308
worker = get_worker('default')
309309
job = queue.enqueue(self.dummy_job_default)
310310
worker.prepare_job_execution(job)
311+
worker.prepare_execution(job)
311312

312313
self.assertEqual(job.get_status(), JobStatus.STARTED)
313314

@@ -345,3 +346,32 @@ def test_worker(self):
345346
self.assertIn(str(worker1.name), str(response.content))
346347
self.assertIn('Birth', str(response.content))
347348
self.assertIn('Total working time', str(response.content))
349+
350+
351+
class SystemTestCase(TestCase):
352+
353+
def setUp(self):
354+
super().setUp()
355+
356+
self.user.is_staff = True
357+
self.user.save()
358+
359+
def test_system_view_default(self):
360+
# Test UI render
361+
response = self.client.get(reverse('core:system'))
362+
self.assertEqual(response.status_code, 200)
363+
364+
# Test export
365+
response = self.client.get(f"{reverse('core:system')}?export=true")
366+
self.assertEqual(response.status_code, 200)
367+
368+
def test_system_view_with_config_revision(self):
369+
ConfigRevision.objects.create()
370+
371+
# Test UI render
372+
response = self.client.get(reverse('core:system'))
373+
self.assertEqual(response.status_code, 200)
374+
375+
# Test export
376+
response = self.client.get(f"{reverse('core:system')}?export=true")
377+
self.assertEqual(response.status_code, 200)

Diff for: netbox/core/views.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -626,11 +626,7 @@ def get(self, request):
626626
}
627627

628628
# Configuration
629-
try:
630-
config = ConfigRevision.objects.get(pk=cache.get('config_version'))
631-
except ConfigRevision.DoesNotExist:
632-
# Fall back to using the active config data if no record is found
633-
config = get_config()
629+
config = get_config()
634630

635631
# Raw data export
636632
if 'export' in request.GET:

Diff for: netbox/dcim/choices.py

+2
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ class InterfaceTypeChoices(ChoiceSet):
871871
TYPE_100ME_T1 = '100base-t1'
872872
TYPE_100ME_SFP = '100base-x-sfp'
873873
TYPE_1GE_FIXED = '1000base-t'
874+
TYPE_1GE_LX_FIXED = '1000base-lx'
874875
TYPE_1GE_TX_FIXED = '1000base-tx'
875876
TYPE_1GE_GBIC = '1000base-x-gbic'
876877
TYPE_1GE_SFP = '1000base-x-sfp'
@@ -1033,6 +1034,7 @@ class InterfaceTypeChoices(ChoiceSet):
10331034
(TYPE_100ME_FIXED, '100BASE-TX (10/100ME)'),
10341035
(TYPE_100ME_T1, '100BASE-T1 (10/100ME Single Pair)'),
10351036
(TYPE_1GE_FIXED, '1000BASE-T (1GE)'),
1037+
(TYPE_1GE_LX_FIXED, '1000BASE-LX (1GE)'),
10361038
(TYPE_1GE_TX_FIXED, '1000BASE-TX (1GE)'),
10371039
(TYPE_2GE_FIXED, '2.5GBASE-T (2.5GE)'),
10381040
(TYPE_5GE_FIXED, '5GBASE-T (5GE)'),

0 commit comments

Comments
 (0)