Skip to content

Commit 95cb4ab

Browse files
authored
Merge branch 'master' into !refactor(backend)--remove-legacy-metadata-endpoints
2 parents cc79569 + 060e917 commit 95cb4ab

150 files changed

Lines changed: 72921 additions & 71030 deletions

File tree

Some content is hidden

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

.github/workflows/qc_checks.yaml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
force: ${{ steps.force.outputs.force }}
4040
cicd: ${{ steps.filter.outputs.cicd }}
4141
requirements: ${{ steps.filter.outputs.requirements }}
42+
runner-perf: ${{ steps.runner-perf.outputs.runner }}
4243

4344
steps:
4445
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1
@@ -74,6 +75,10 @@ jobs:
7475
if: |
7576
contains(github.event.pull_request.labels.*.name, 'dependency') ||
7677
contains(github.event.pull_request.labels.*.name, 'full-run')
78+
- name: Which runner to use?
79+
id: runner-perf
80+
# decide if we are running in inventree/inventree -> use codspeed-macro runner else ubuntu-24.04
81+
run: echo "runner=$([[ '${{ github.repository }}' == 'inventree/InvenTree' ]] && echo 'codspeed-macro' || echo 'ubuntu-24.04')" >> $GITHUB_OUTPUT
7782

7883
pre-commit:
7984
name: Style [pre-commit]
@@ -282,7 +287,7 @@ jobs:
282287

283288
python:
284289
name: Tests - inventree-python
285-
runs-on: ubuntu-24.04
290+
runs-on: ${{ needs.paths-filter.outputs.runner-perf }}
286291

287292
needs: ["pre-commit", "paths-filter"]
288293
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
@@ -303,6 +308,7 @@ jobs:
303308
INVENTREE_SITE_URL: http://127.0.0.1:12345
304309
INVENTREE_DEBUG: true
305310
INVENTREE_LOG_LEVEL: WARNING
311+
node_version: '>=20.19.6'
306312

307313
steps:
308314
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # pin@v6.0.1
@@ -314,6 +320,7 @@ jobs:
314320
apt-dependency: gettext poppler-utils
315321
dev-install: true
316322
update: true
323+
npm: true
317324
- name: Download Python Code For `${WRAPPER_NAME}`
318325
run: git clone --depth 1 https://github.com/inventree/${WRAPPER_NAME} ./${WRAPPER_NAME}
319326
- name: Start InvenTree Server
@@ -333,7 +340,9 @@ jobs:
333340
cd ${WRAPPER_NAME}
334341
pip install .
335342
- name: Performance Reporting
336-
uses: CodSpeedHQ/action@972e3437949c89e1357ebd1a2dbc852fcbc57245 # pin@v4
343+
uses: CodSpeedHQ/action@dbda7111f8ac363564b0c51b992d4ce76bb89f2f # pin@v4
344+
# check if we are in inventree/inventree - reporting only works in that OIDC context
345+
if: github.repository == 'inventree/InvenTree'
337346
with:
338347
mode: walltime
339348
run: pytest ./src/performance --codspeed
@@ -392,10 +401,11 @@ jobs:
392401

393402
performance:
394403
name: Tests - Performance
395-
runs-on: ubuntu-24.04 # codspeed-macro
404+
runs-on: ${{ needs.paths-filter.outputs.runner-perf }}
396405

397406
needs: ["pre-commit", "paths-filter"]
398-
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true'
407+
# check if we are in inventree/inventree - reporting only works in that OIDC context
408+
if: (needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.force == 'true') && github.repository == 'inventree/InvenTree'
399409
permissions:
400410
contents: read
401411
id-token: write
@@ -421,7 +431,7 @@ jobs:
421431
env:
422432
node_version: '>=20.19.0'
423433
- name: Performance Reporting
424-
uses: CodSpeedHQ/action@972e3437949c89e1357ebd1a2dbc852fcbc57245 # pin@v4
434+
uses: CodSpeedHQ/action@dbda7111f8ac363564b0c51b992d4ce76bb89f2f # pin@v4
425435
with:
426436
mode: walltime
427437
run: inv dev.test --pytest
@@ -754,7 +764,7 @@ jobs:
754764
env:
755765
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
756766
- name: Upload SARIF file
757-
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # pin@v3
767+
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # pin@v3
758768
with:
759769
sarif_file: results.sarif
760770
category: zizmor

.github/workflows/release.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build frontend
5656
run: cd src/frontend && npm run compile && npm run build
5757
- name: Create SBOM for frontend
58-
uses: anchore/sbom-action@a930d0ac434e3182448fe678398ba5713717112a # pin@v0
58+
uses: anchore/sbom-action@0b82b0b1a22399a1c542d4d656f70cd903571b5c # pin@v0
5959
with:
6060
artifact-name: frontend-build.spdx
6161
path: src/frontend
@@ -65,6 +65,8 @@ jobs:
6565
run: cd src/backend/InvenTree/web/static/web/.vite && echo "${REF_NAME}" > tag.txt
6666
env:
6767
REF_NAME: ${{ github.ref_name }}
68+
- name: Write version file - SOURCE
69+
run: cd src/backend/InvenTree/web/static/web/.vite && echo "GitHub Actions build on $(date --utc +%Y-%m-%dT%H:%M:%SZ)" > source.txt
6870
- name: Zip frontend
6971
run: |
7072
cd src/backend/InvenTree/web/static/web

.github/workflows/scorecard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ jobs:
6767

6868
# Upload the results to GitHub's code scanning dashboard.
6969
- name: "Upload to code-scanning"
70-
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
70+
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
7171
with:
7272
sarif_file: results.sarif

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ InvenTree is designed to be **extensible**, and provides multiple options for **
5656
* [InvenTree API](https://docs.inventree.org/en/latest/api/)
5757
* [Python module](https://docs.inventree.org/en/latest/api/python/)
5858
* [Plugin interface](https://docs.inventree.org/en/latest/plugins/)
59-
* [Third party tools](https://docs.inventree.org/en/latest/plugins/integrate/)
59+
* [Third party tools](https://inventree.org/extend/integrate/)
6060

6161
<!-- TechStack -->
6262
### :space_invader: Tech Stack
@@ -200,6 +200,7 @@ Find a full list of used third-party libraries in the license information dialog
200200
</a>
201201
<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" /> </a>
202202
<a href="https://crowdin.com"> <img src="https://crowdin.com/images/crowdin-logo.svg" alt="Translation by Crowdin" /> </a> <br>
203+
<a href="https://codspeed.io/inventree/InvenTree?utm_source=badge"><img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed Badge"/></a>
203204
</p>
204205

205206

contrib/container/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ psycopg-pool==3.3.0 \
118118
--hash=sha256:2e44329155c410b5e8666372db44276a8b1ebd8c90f1c3026ebba40d4bc81063 \
119119
--hash=sha256:fa115eb2860bd88fce1717d75611f41490dec6135efb619611142b24da3f6db5
120120
# via psycopg
121-
pyasn1==0.6.1 \
122-
--hash=sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629 \
123-
--hash=sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034
121+
pyasn1==0.6.2 \
122+
--hash=sha256:1eb26d860996a18e9b6ed05e7aae0e9fc21619fcee6af91cca9bad4fbea224bf \
123+
--hash=sha256:9b59a2b25ba7e4f8197db7686c09fb33e658b98339fadb826e9512629017833b
124124
# via
125125
# pyasn1-modules
126126
# python-ldap

docs/docs/app/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ The InvenTree app can be downloaded from either the Android or Apple app stores,
2828

2929
<span class='fab fa-android'></span> [Android Play Store](https://play.google.com/store/apps/details?id=inventree.inventree_app).
3030

31+
!!! info "APK Download"
32+
As an alternative to using the Android Play Store, the InvenTree app APK file can be downloaded directly via our [polar.sh](https://polar.sh/inventree/products/299bf0d5-af88-4e0f-becf-c007ad37ecf2) page.
33+
3134
### iOS
3235

3336
<span class='fab fa-apple'></span> [Apple App Store](https://apps.apple.com/au/app/inventree/id1581731101#?platform=iphone)

docs/docs/start/accounts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ invoke superuser
2626
Or, if you are running InvenTree in a Docker container:
2727

2828
```bash
29-
docker exec -rm -it inventree-server invoke superuser
29+
docker exec -it inventree-server invoke superuser
3030
```
3131

3232
### User Management

docs/docs/start/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ The following email settings are available:
333333
| INVENTREE_EMAIL_PORT | email.port | Email server port | 25 |
334334
| INVENTREE_EMAIL_USERNAME | email.username | Email account username | *Not specified* |
335335
| INVENTREE_EMAIL_PASSWORD | email.password | Email account password | *Not specified* |
336-
| INVENTREE_EMAIL_TLS | email.tls | Enable TLS support | False |
337-
| INVENTREE_EMAIL_SSL | email.ssl | Enable SSL support | False |
336+
| INVENTREE_EMAIL_TLS | email.tls | Enable STARTTLS support (commonly port 567) | False |
337+
| INVENTREE_EMAIL_SSL | email.ssl | Enable legacy SSL/TLS support (commonly port 465) | False |
338338
| INVENTREE_EMAIL_SENDER | email.sender | Sending email address | *Not specified* |
339339
| INVENTREE_EMAIL_PREFIX | email.prefix | Prefix for subject text | [InvenTree] |
340340

src/backend/InvenTree/InvenTree/api_version.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
"""InvenTree API version information."""
22

33
# InvenTree API version
4-
INVENTREE_API_VERSION = 438
4+
INVENTREE_API_VERSION = 443
55
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
66

77
INVENTREE_API_TEXT = """
88
9+
v443 -> 2026-01-21 : https://github.com/inventree/InvenTree/pull/11177
10+
- Adds IPN ordering option for BomItem API endpoint
11+
- Adds IPN ordering option for BuildLine API endpoint
12+
13+
v442 -> 2026-01-17 : https://github.com/inventree/InvenTree/pull/11157
14+
- Typo fixes, no functional changes
15+
16+
v441 -> 2026-01-17 : https://github.com/inventree/InvenTree/pull/11153
17+
- Allow export of supplier part pricing data
18+
19+
v440 -> 2026-01-15 : https://github.com/inventree/InvenTree/pull/10796
20+
- Adds confirm and confirm_text to all settings
21+
22+
v439 -> 2026-01-09 : https://github.com/inventree/InvenTree/pull/11092
23+
- Add missing nullable annotations
24+
925
v438 -> 2026-01-09 : https://github.com/inventree/InvenTree/pull/11104
1026
- Adds a simpler / faster health check endpoint at /api/system/health/
1127

src/backend/InvenTree/InvenTree/auth_overrides.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Overrides for allauth and adjacent packages to enforce InvenTree specific auth settings and restirctions."""
22

3+
from typing import Literal
4+
35
from django import forms
46
from django.conf import settings
57
from django.contrib.auth.models import Group
@@ -14,7 +16,6 @@
1416
from allauth.headless.adapter import DefaultHeadlessAdapter
1517
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
1618

17-
import InvenTree.sso
1819
from common.settings import get_global_setting
1920
from InvenTree.exceptions import log_error
2021

@@ -85,12 +86,12 @@ def clean(self):
8586
return cleaned_data
8687

8788

88-
def registration_enabled():
89+
RegistrationKeys = Literal['LOGIN_ENABLE_REG', 'LOGIN_ENABLE_SSO_REG']
90+
91+
92+
def registration_enabled(setting_name: RegistrationKeys = 'LOGIN_ENABLE_REG'):
8993
"""Determine whether user registration is enabled."""
90-
if (
91-
get_global_setting('LOGIN_ENABLE_REG')
92-
or InvenTree.sso.sso_registration_enabled()
93-
):
94+
if get_global_setting(setting_name):
9495
if is_email_configured():
9596
return True
9697
else:
@@ -103,12 +104,14 @@ def registration_enabled():
103104
class RegistrationMixin:
104105
"""Mixin to check if registration should be enabled."""
105106

107+
REGISTRATION_SETTING: RegistrationKeys = 'LOGIN_ENABLE_REG'
108+
106109
def is_open_for_signup(self, request, *args, **kwargs):
107110
"""Check if signup is enabled in settings.
108111
109112
Configure the class variable `REGISTRATION_SETTING` to set which setting should be used, default: `LOGIN_ENABLE_REG`.
110113
"""
111-
if registration_enabled():
114+
if registration_enabled(self.REGISTRATION_SETTING):
112115
return super().is_open_for_signup(request, *args, **kwargs)
113116
return False
114117

@@ -187,6 +190,8 @@ def send_password_reset_mail(self, user, email, context):
187190
class CustomSocialAccountAdapter(RegistrationMixin, DefaultSocialAccountAdapter):
188191
"""Override of adapter to use dynamic settings."""
189192

193+
REGISTRATION_SETTING = 'LOGIN_ENABLE_SSO_REG'
194+
190195
def is_auto_signup_allowed(self, request, sociallogin):
191196
"""Check if auto signup is enabled in settings."""
192197
if get_global_setting('LOGIN_SIGNUP_SSO_AUTO', True):

0 commit comments

Comments
 (0)