Skip to content

Commit 9d86e81

Browse files
authored
Merge branch 'master' into dependabot/pip/django-reversion-approx-eq-6.0.0
2 parents 3dd6771 + ba5e7a1 commit 9d86e81

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
django-version: django~=4.2.0
4242

4343
steps:
44-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v5
4545
with:
4646
ref: ${{ github.event.pull_request.head.sha }}
4747

@@ -59,7 +59,7 @@ jobs:
5959
sudo dpkg-reconfigure man-db
6060
6161
- name: Set up Python ${{ matrix.python-version }}
62-
uses: actions/setup-python@v5
62+
uses: actions/setup-python@v6
6363
with:
6464
python-version: ${{ matrix.python-version }}
6565
cache: "pip"

.github/workflows/publiccode-yml-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
publiccode_yml_validation:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
9+
- uses: actions/checkout@v5
1010
- uses: italia/publiccode-parser-action@v1
1111
with:
1212
publiccode: "publiccode.yml"

.github/workflows/pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
permissions:
1818
id-token: write
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121
- name: Set up Python
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@v6
2323
with:
2424
python-version: "3.10"
2525
- name: Install dependencies

openwisp_controller/config/migrations/0061_config_checksum_db.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,29 @@ def populate_checksum_db(apps, schema_editor):
88
"""
99
Populate checksum_db field with current checksum values
1010
for existing Config objects.
11+
12+
We don't want to change the Config.status when populating this field,
13+
hence we use Config.objects.bulk_update() instead of
14+
Config.update_status_if_checksum_changed().
1115
"""
1216
Config = load_model("config", "Config")
17+
chunk_size = 100
18+
updated_configs = []
1319
qs = (
1420
Config.objects.prefetch_related("vpnclient_set", "templates")
1521
.select_related("device", "device__organization__config_settings")
1622
.filter(checksum_db__isnull=True)
17-
.iterator(chunk_size=100)
23+
.iterator(chunk_size=chunk_size)
1824
)
1925
for config in qs:
20-
config.update_status_if_checksum_changed()
26+
config.checksum_db = config.checksum
27+
updated_configs.append(config)
28+
if len(updated_configs) >= chunk_size:
29+
Config.objects.bulk_update(updated_configs, ["checksum_db"])
30+
updated_configs = []
31+
32+
if updated_configs:
33+
Config.objects.bulk_update(updated_configs, ["checksum_db"])
2134

2235

2336
class Migration(migrations.Migration):

requirements-test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
pytest-cov~=6.2.1
1+
pytest-cov~=7.0.0
22
openwisp-utils[qa,selenium,channels-test] @ https://github.com/openwisp/openwisp-utils/tarball/1.2
33
django_redis~=6.0.0
44
mock-ssh-server~=0.9.1
5-
responses~=0.25.7
5+
responses~=0.25.8
66
psycopg2-binary~=2.9.10

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ scp~=0.15.0
1515
django-cache-memoize~=0.2.1
1616
shortuuid~=1.0.13
1717
netaddr~=1.3.0
18-
django-import-export~=4.3.9
18+
django-import-export~=4.3.10

0 commit comments

Comments
 (0)