From a2f6f037e544908c4a3b7761b011f10e04ef9d5d Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 27 Feb 2024 08:34:33 +0100 Subject: [PATCH 01/10] added 0.14.0 release section --- CHANGELOG.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000000..ce4d666b3d73 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,72 @@ +# Changelog + +All notable changes to this project will be documented in this file (starting with 0.15.0). + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). InvenTree is currently considered to be in a pre-1.0 state, bumps to the minor version number signify new features. The [roadmap to 1.0](https://github.com/inventree/InvenTree/milestone/17) is public. + +## [Unreleased] + +### Added + + +### Changed + + +### Removed + +## [0.14.0] - 2024-02-29 + +#### General + +This release focused on furthering PUI, improving the API and enhancing the developer tooling. + +We added machine integration, a feature that allows the user to connect more than 1 printer of the same manufacturer and model to an instance. It also enables integration of other machines, it is planned to develop this feature further in the next releases. This feature is PUI-only. [#6486](https://github.com/inventree/InvenTree/issues/6486) + +A few quality of life improvements were made to the CI, such as the addition of API schema tracking, which ensures API versions are tracked and documented. We switched to ruff for CI linting, uv for installing packages and updated to the 4.2 LTS version of Django. + +PUI was developed further, with the addition of support for SSO, user registration, and greatly improved tables among many additions. Especially administrative functions are improved compared to the classical UI (CUI). + +PUI is enabled by default in this release and can be accessed by navigating to `/platform/` on the instance. We appreciate feedback. + +### Added + +- Machine model and integration https://github.com/inventree/InvenTree/pull/4824 +- Disabling plugin installation from the web interface/API (https://github.com/inventree/InvenTree/issues/6531) +- Importing part image names https://github.com/inventree/InvenTree/pull/6513 +- Support for Engineering units https://github.com/inventree/InvenTree/pull/6539 +- Blocking outputs if tests not successful https://github.com/inventree/InvenTree/pull/6057 +- API schema tracking https://github.com/inventree/InvenTree/pull/6440 +- API documentation on the doc site https://github.com/inventree/InvenTree/pull/6319 +- Wider Validation plugin support https://github.com/inventree/InvenTree/pull/6410 +- Support for SSO in PUI https://github.com/inventree/InvenTree/pull/6333 +- Translation support for tables in PUI https://github.com/inventree/InvenTree/pull/6357 +- Slovak support https://github.com/inventree/InvenTree/pull/6351 +- User Registration for PUI https://github.com/inventree/InvenTree/pull/6309 +- Creating user with password from file https://github.com/inventree/InvenTree/pull/6144 +- OpenAPI tracing https://github.com/inventree/InvenTree/pull/6211 + +### Fixed + +- SITE_URL missdetection (https://github.com/inventree/InvenTree/pull/6585) +- Wrong rendering of temperatures (https://github.com/inventree/InvenTree/pull/6584) +- Maintenance mode problems https://github.com/inventree/InvenTree/pull/6422 +- News Feed timeouts blocking the server https://github.com/inventree/InvenTree/pull/6250 +- Importing data with owners https://github.com/inventree/InvenTree/pull/6271 + +### Changed + +- Switched from Django 3 LTS to 4.2 LTS https://github.com/inventree/InvenTree/pull/6173 +- Switched to psycog >3 https://github.com/inventree/InvenTree/pull/6573 +- Switched from django-allauth 0.59.0 to https://github.com/inventree/InvenTree/pull/6301 +- Switched to uv for install (expermintal) https://github.com/inventree/InvenTree/pull/6499 +- Switched to ruff for CI linnting https://github.com/inventree/InvenTree/pull/6167 + +### Removed + +- Django-debug-toolbar https://github.com/inventree/InvenTree/pull/6196 + + +## Old releases + +Release notes are available https://docs.inventree.org/en/stable/releases/release_notes/ From 944c55c583db1bec52affc16ee824c9c339a0a35 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Thu, 29 Feb 2024 23:36:27 +0100 Subject: [PATCH 02/10] Add release workflow dummy --- .github/workflows/do_release.yaml | 60 +++++++++++++++++++++++++++++++ ci/version_check.py | 19 ++++++++++ 2 files changed, 79 insertions(+) create mode 100644 .github/workflows/do_release.yaml diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml new file mode 100644 index 000000000000..76f37c8d10f2 --- /dev/null +++ b/.github/workflows/do_release.yaml @@ -0,0 +1,60 @@ +name: Publish a new release + +on: + workflow_dispatch: + inputs: + target: + description: Which kind of release is this? + required: true + type: choice + default: "stable" + options: + - "master" + - "stable" + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v2 + - name: Set up environment + run: pip install requests >/dev/null 2>&1 + - name: Gather version information + id: version + env: + TARGET: ${{ github.event.inputs.target }} + run: python3 ci/version_check.py do_release + - name: Gather auto-text + id: auto_text + run: | + auto_text = curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \ + -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ github.event.inputs.target }}","previous_tag_name":"${{ steps.version.outputs.old_version }}}","configuration_file_path":".github/release.yml"}' + echo $auto_text + echo "auto_text=$auto_text" >> $GITHUB_OUTPUT + - name: "Dummy: Set version" + run: echo "Change version to ${{ steps.version.outputs.tag }}" + - name: "Dummy: Update changelog header" + id: changelog + run: | + echo "Update changelog to ${{ steps.version.outputs.tag }}" + echo "changelog_text=$(grep 'version' setup.py | cut -d "'" -f 2)" >> $GITHUB_OUTPUT + - name: "Dummy: Push changes" + run: echo "Push changes to ${{ github.event.inputs.target }}" + - name: "Dummy: Create release" + run: | + echo "Creating release for ${{ steps.version.outputs.tag }} on branch ${{ github.event.inputs.target }}" + echo "Branch text: + ${{ steps.changelog.outputs.changelog_text }} + + ${{ steps.auto_text.outputs.auto_text }}" + - name: "Dummy: Bumpy version on master" + if: github.event.inputs.target == 'master' + run: echo "Bumping version on master to ${{ steps.version.outputs.new_tag }}" diff --git a/ci/version_check.py b/ci/version_check.py index a46236508a29..a3c28fba7679 100644 --- a/ci/version_check.py +++ b/ci/version_check.py @@ -97,6 +97,25 @@ def check_version_number(version_string, allow_duplicate=False): results = re.findall(r"""INVENTREE_API_VERSION = (.*)""", text) print(results[0]) exit(0) + + if 'do_release' in sys.argv: + target = os.getenv('TARGET') + highest_tupple = get_existing_release_tags()[0] + + old_version = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2]}' + if target == 'master': + tag = f'{highest_tupple[0]}.{highest_tupple[1] + 1}.0' + elif target == 'stable': + tag = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2] + 1}' + else: + raise ValueError(f"Unknown target '{target}'") + new_tag = f'{tag} dev' + + with open(os.getenv('GITHUB_OUTPUT'), 'a') as env_file: + env_file.write(f'old_version={old_version}\n') + env_file.write(f'tag={tag}\n') + env_file.write(f'new_tag={new_tag}\n') + exit(0) # GITHUB_REF_TYPE may be either 'branch' or 'tag' GITHUB_REF_TYPE = os.environ['GITHUB_REF_TYPE'] From 6db2e4a6ee45d06dad50131f86d55b19f9025d42 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Thu, 29 Feb 2024 23:50:34 +0100 Subject: [PATCH 03/10] fix definition --- .github/workflows/do_release.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml index 76f37c8d10f2..76c0e70b39c5 100644 --- a/.github/workflows/do_release.yaml +++ b/.github/workflows/do_release.yaml @@ -26,17 +26,19 @@ jobs: id: version env: TARGET: ${{ github.event.inputs.target }} - run: python3 ci/version_check.py do_release + run: | + python3 ci/version_check.py do_release + cat $GITHUB_OUTPUT - name: Gather auto-text id: auto_text run: | - auto_text = curl -L \ + auto_text=$(curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \ - -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ github.event.inputs.target }}","previous_tag_name":"${{ steps.version.outputs.old_version }}}","configuration_file_path":".github/release.yml"}' + -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ github.event.inputs.target }}","previous_tag_name":"${{ steps.version.outputs.old_version }}}","configuration_file_path":".github/release.yml"}') echo $auto_text echo "auto_text=$auto_text" >> $GITHUB_OUTPUT - name: "Dummy: Set version" From 277c2d5e975f85a0622a8356d71b06115ffd308d Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Thu, 29 Feb 2024 23:57:57 +0100 Subject: [PATCH 04/10] fix branch assertation --- .github/workflows/do_release.yaml | 2 +- ci/version_check.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml index 76c0e70b39c5..96667071bec8 100644 --- a/.github/workflows/do_release.yaml +++ b/.github/workflows/do_release.yaml @@ -38,7 +38,7 @@ jobs: -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \ - -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ github.event.inputs.target }}","previous_tag_name":"${{ steps.version.outputs.old_version }}}","configuration_file_path":".github/release.yml"}') + -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}}","configuration_file_path":".github/release.yml"}') echo $auto_text echo "auto_text=$auto_text" >> $GITHUB_OUTPUT - name: "Dummy: Set version" diff --git a/ci/version_check.py b/ci/version_check.py index a3c28fba7679..336b9ba3d0f0 100644 --- a/ci/version_check.py +++ b/ci/version_check.py @@ -105,14 +105,17 @@ def check_version_number(version_string, allow_duplicate=False): old_version = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2]}' if target == 'master': tag = f'{highest_tupple[0]}.{highest_tupple[1] + 1}.0' + old_branch = 'master' elif target == 'stable': tag = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2] + 1}' + old_branch = f'{highest_tupple[0]}.{highest_tupple[1]}.x' else: raise ValueError(f"Unknown target '{target}'") new_tag = f'{tag} dev' with open(os.getenv('GITHUB_OUTPUT'), 'a') as env_file: env_file.write(f'old_version={old_version}\n') + env_file.write(f'old_branch={old_branch}\n') env_file.write(f'tag={tag}\n') env_file.write(f'new_tag={new_tag}\n') exit(0) From 7db4abd48787af564e521b3ee24463163689aea2 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 1 Mar 2024 00:07:04 +0100 Subject: [PATCH 05/10] fix release note action --- .github/workflows/do_release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml index 96667071bec8..74f6a9594a6d 100644 --- a/.github/workflows/do_release.yaml +++ b/.github/workflows/do_release.yaml @@ -35,10 +35,10 @@ jobs: auto_text=$(curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \ - -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}}","configuration_file_path":".github/release.yml"}') + -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}","configuration_file_path":".github/release.yml"}') echo $auto_text echo "auto_text=$auto_text" >> $GITHUB_OUTPUT - name: "Dummy: Set version" From e2e459601c2f70a8c41bd923ffe107c8f2c3dd2f Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 1 Mar 2024 00:11:25 +0100 Subject: [PATCH 06/10] update PAT ref --- .github/workflows/do_release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml index 74f6a9594a6d..5ac7734d33c3 100644 --- a/.github/workflows/do_release.yaml +++ b/.github/workflows/do_release.yaml @@ -35,10 +35,10 @@ jobs: auto_text=$(curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "Authorization: Bearer ${{ secrets.RELEASE_PAT }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \ - -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}","configuration_file_path":".github/release.yml"}') + -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}"}') echo $auto_text echo "auto_text=$auto_text" >> $GITHUB_OUTPUT - name: "Dummy: Set version" From 0436b550d3139ae0f3eb11e6fc873ab689b8c794 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 1 Mar 2024 00:13:30 +0100 Subject: [PATCH 07/10] silence curl --- .github/workflows/do_release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml index 5ac7734d33c3..2267ad9d9443 100644 --- a/.github/workflows/do_release.yaml +++ b/.github/workflows/do_release.yaml @@ -32,7 +32,7 @@ jobs: - name: Gather auto-text id: auto_text run: | - auto_text=$(curl -L \ + auto_text=$(curl -s -S -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ secrets.RELEASE_PAT }}" \ From 1a6e39048252c267e4b8a82ee8d49ae14837f0f4 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 1 Mar 2024 00:15:45 +0100 Subject: [PATCH 08/10] fix output formatting --- .github/workflows/do_release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml index 2267ad9d9443..e0d7e94ae506 100644 --- a/.github/workflows/do_release.yaml +++ b/.github/workflows/do_release.yaml @@ -40,7 +40,8 @@ jobs: https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \ -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}"}') echo $auto_text - echo "auto_text=$auto_text" >> $GITHUB_OUTPUT + echo '$auto_text' >> $GITHUB_STEP_SUMMARY + echo "auto_text='$auto_text'" >> $GITHUB_OUTPUT - name: "Dummy: Set version" run: echo "Change version to ${{ steps.version.outputs.tag }}" - name: "Dummy: Update changelog header" From f901d1c6f3e74f45195dd8e00cb4657d1481017e Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 1 Mar 2024 00:22:41 +0100 Subject: [PATCH 09/10] multiline delimiter? --- .github/workflows/do_release.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml index e0d7e94ae506..176e140bd8a9 100644 --- a/.github/workflows/do_release.yaml +++ b/.github/workflows/do_release.yaml @@ -40,8 +40,12 @@ jobs: https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \ -d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}"}') echo $auto_text - echo '$auto_text' >> $GITHUB_STEP_SUMMARY - echo "auto_text='$auto_text'" >> $GITHUB_OUTPUT + echo $auto_text >> $GITHUB_STEP_SUMMARY + { + echo 'auto_text<> "$GITHUB_OUTPUT" - name: "Dummy: Set version" run: echo "Change version to ${{ steps.version.outputs.tag }}" - name: "Dummy: Update changelog header" From 157c9418604eb883c859b6286d7041606c8f9a40 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 1 Mar 2024 00:26:30 +0100 Subject: [PATCH 10/10] fix syntax? --- .github/workflows/do_release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/do_release.yaml b/.github/workflows/do_release.yaml index 176e140bd8a9..abb722ccedb1 100644 --- a/.github/workflows/do_release.yaml +++ b/.github/workflows/do_release.yaml @@ -44,7 +44,7 @@ jobs: { echo 'auto_text<> "$GITHUB_OUTPUT" - name: "Dummy: Set version" run: echo "Change version to ${{ steps.version.outputs.tag }}"