Skip to content

Commit b1394ff

Browse files
authored
Merge pull request #1508 from netbox-community/develop
Version 3.4.0
2 parents 477decd + e9a8e14 commit b1394ff

File tree

12 files changed

+32
-56
lines changed

12 files changed

+32
-56
lines changed

.github/workflows/push.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
packages: read
2424
statuses: write
2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727
with:
2828
# Full git history is needed to get a proper
2929
# list of changed files within `super-linter`
3030
fetch-depth: 0
3131
- name: Lint Code Base
32-
uses: super-linter/super-linter@v7
32+
uses: super-linter/super-linter@v8
3333
env:
3434
DEFAULT_BRANCH: develop
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -40,6 +40,8 @@ jobs:
4040
VALIDATE_DOCKERFILE: false
4141
VALIDATE_GITLEAKS: false
4242
VALIDATE_JSCPD: false
43+
VALIDATE_TRIVY: false
44+
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
4345
FILTER_REGEX_EXCLUDE: (.*/)?(LICENSE|configuration/.*)
4446
EDITORCONFIG_FILE_NAME: .editorconfig-checker.json
4547
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yaml
@@ -70,7 +72,7 @@ jobs:
7072
steps:
7173
- id: git-checkout
7274
name: Checkout
73-
uses: actions/checkout@v4
75+
uses: actions/checkout@v5
7476
- id: buildx-setup
7577
name: Set up Docker Buildx
7678
uses: docker/setup-buildx-action@v3

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
steps:
3333
- id: source-checkout
3434
name: Checkout
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v5
3636
with:
3737
ref: ${{ matrix.build.branch }}
3838
- id: set-netbox-docker-version

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARG FROM
22
FROM ${FROM} AS builder
33

4-
COPY --from=ghcr.io/astral-sh/uv:0.7 /uv /usr/local/bin/
4+
COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /usr/local/bin/
55
RUN export DEBIAN_FRONTEND=noninteractive \
66
&& apt-get update -qq \
77
&& apt-get upgrade \
@@ -79,7 +79,6 @@ COPY ${NETBOX_PATH} /opt/netbox
7979
COPY docker/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py
8080
COPY docker/ldap_config.docker.py /opt/netbox/netbox/netbox/ldap_config.py
8181
COPY docker/docker-entrypoint.sh /opt/netbox/docker-entrypoint.sh
82-
COPY docker/housekeeping.sh /opt/netbox/housekeeping.sh
8382
COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
8483
COPY configuration/ /etc/netbox/config/
8584
COPY docker/nginx-unit.json /etc/unit/
@@ -89,7 +88,7 @@ WORKDIR /opt/netbox/netbox
8988

9089
# Must set permissions for '/opt/netbox/netbox/media' directory
9190
# to g+w so that pictures can be uploaded to netbox.
92-
RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
91+
RUN mkdir -p static media /opt/unit/state/ /opt/unit/tmp/ \
9392
&& chown -R unit:root /opt/unit/ media reports scripts \
9493
&& chmod -R g+w /opt/unit/ media reports scripts \
9594
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build \

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.0
1+
3.4.0

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ DOCKERFILE The name of Dockerfile to use.
6262
DOCKER_FROM The base image to use.
6363
${_GREEN}Default:${_CLEAR} 'ubuntu:24.04'
6464
65-
BUILDX_PLATFORMS
65+
BUILDX_PLATFORM
6666
Specifies the platform(s) to build the image for.
6767
${_CYAN}Example:${_CLEAR} 'linux/amd64,linux/arm64'
6868
${_GREEN}Default:${_CLEAR} 'linux/amd64'

configuration/configuration.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,21 @@ def _environ_get_and_map(variable_name: str, default: str | None = None, map_fn:
6464

6565
# PostgreSQL database configuration. See the Django documentation for a complete list of available parameters:
6666
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
67-
DATABASE = {
68-
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
69-
'USER': environ.get('DB_USER', ''), # PostgreSQL username
70-
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
71-
# PostgreSQL password
72-
'HOST': environ.get('DB_HOST', 'localhost'), # Database server
73-
'PORT': environ.get('DB_PORT', ''), # Database port (leave blank for default)
74-
'OPTIONS': {'sslmode': environ.get('DB_SSLMODE', 'prefer')},
75-
# Database connection SSLMODE
76-
'CONN_MAX_AGE': _environ_get_and_map('DB_CONN_MAX_AGE', '300', _AS_INT),
77-
# Max database connection age
78-
'DISABLE_SERVER_SIDE_CURSORS': _environ_get_and_map('DB_DISABLE_SERVER_SIDE_CURSORS', 'False', _AS_BOOL),
79-
# Disable the use of server-side cursors transaction pooling
67+
DATABASES = {
68+
'default': {
69+
'NAME': environ.get('DB_NAME', 'netbox'), # Database name
70+
'USER': environ.get('DB_USER', ''), # PostgreSQL username
71+
'PASSWORD': _read_secret('db_password', environ.get('DB_PASSWORD', '')),
72+
# PostgreSQL password
73+
'HOST': environ.get('DB_HOST', 'localhost'), # Database server
74+
'PORT': environ.get('DB_PORT', ''), # Database port (leave blank for default)
75+
'OPTIONS': {'sslmode': environ.get('DB_SSLMODE', 'prefer')},
76+
# Database connection SSLMODE
77+
'CONN_MAX_AGE': _environ_get_and_map('DB_CONN_MAX_AGE', '300', _AS_INT),
78+
# Max database connection age
79+
'DISABLE_SERVER_SIDE_CURSORS': _environ_get_and_map('DB_DISABLE_SERVER_SIDE_CURSORS', 'False', _AS_BOOL),
80+
# Disable the use of server-side cursors transaction pooling
81+
}
8082
}
8183

8284
# Redis database settings. Redis is used for caching and for queuing background tasks such as webhook events. A separate

configuration/ldap/ldap_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@ def _import_group_type(group_type_name):
109109
"last_name": environ.get('AUTH_LDAP_ATTR_LASTNAME', 'sn'),
110110
"email": environ.get('AUTH_LDAP_ATTR_MAIL', 'mail')
111111
}
112+
113+
# Update user object with the latest values from the LDAP directory every time the user logs in.
114+
AUTH_LDAP_ALWAYS_UPDATE_USER = environ.get('AUTH_LDAP_ALWAYS_UPDATE_USER', 'True').lower() == 'true'

docker-compose.test.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ services:
2828
start_period: 40s
2929
timeout: 3s
3030
interval: 15s
31-
netbox-housekeeping:
32-
<<: *netbox
33-
command:
34-
- /opt/netbox/housekeeping.sh
35-
healthcheck:
36-
test: ps -aux | grep -v grep | grep -q housekeeping || exit 1
37-
start_period: 40s
38-
timeout: 3s
39-
interval: 15s
4031

4132
postgres:
4233
image: docker.io/postgres:17-alpine

docker-compose.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
netbox: &netbox
3-
image: docker.io/netboxcommunity/netbox:${VERSION-v4.3-3.3.0}
3+
image: docker.io/netboxcommunity/netbox:${VERSION-v4.4-3.4.0}
44
depends_on:
55
- postgres
66
- redis
@@ -31,18 +31,6 @@ services:
3131
start_period: 20s
3232
timeout: 3s
3333
interval: 15s
34-
netbox-housekeeping:
35-
<<: *netbox
36-
depends_on:
37-
netbox:
38-
condition: service_healthy
39-
command:
40-
- /opt/netbox/housekeeping.sh
41-
healthcheck:
42-
test: ps -aux | grep -v grep | grep -q housekeeping || exit 1
43-
start_period: 20s
44-
timeout: 3s
45-
interval: 15s
4634

4735
# postgres
4836
postgres:

docker/housekeeping.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)