diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index a908de3c6..8cb72a8e0 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -15,21 +15,63 @@ jobs: matrix: os: ["ubuntu-latest"] python: ["3.7", "3.8", "3.9", "3.10", "3.11"] - branch: ["master"] + branch: ["master", "release"] runs-on: ${{ matrix.os }} steps: + - name: ⬇ Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + path: src + - name: 🐍 Set up Python ${{ matrix.python }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - - name: ⬇ Checkout code + + # Checkout code and install + - name: ⬇ Checkout code to test + if: ${{ matrix.branch != 'release' }} uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} fetch-depth: 0 + path: checkout - name: πŸ‘· Build and install checkout + if: ${{ matrix.branch != 'release' }} + working-directory: checkout run: | pip install . + + # Install latest release + - name: πŸ‘€ Determine latest release + if: ${{ matrix.branch == 'release' }} + run: | + OCTOPRINT_VERSION=$(curl -i https://github.com/OctoPrint/OctoPrint/releases/latest | grep -i location: | head -n1 | awk -F/ '{print $NF}' | tr -d '\r') + echo "OCTOPRINT_VERSION=$OCTOPRINT_VERSION" >> $GITHUB_ENV + - name: πŸ‘· Build and install latest release + if: ${{ matrix.branch == 'release' }} + run: | + pip install https://github.com/OctoPrint/OctoPrint/archive/${{ env.OCTOPRINT_VERSION }}.zip + + # Test if server starts without error + - name: πŸ— Create base config for test server + run: | + mkdir e2econfig + cp -r src/.github/fixtures/with_acl/* e2econfig + - name: πŸ§ͺ Start OctoPrint server + run: | + timeout -k 10s 30s octoprint serve --basedir e2econfig & + wait + - name: πŸ”Ž Check octoprint.log for errors + run: | + log=${{ github.workspace }}/e2econfig/logs/octoprint.log + if grep "\- ERROR \-" $log; then + echo "::error::Errors were logged to octoprint.log" + grep -Pazo '(?m)^\N+\- ERROR \-\N*\n(^\N*?\n)*?(?=\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} \- )' $log + exit 1 + fi + - name: πŸ“§ Discord success notification continue-on-error: true env: @@ -45,38 +87,3 @@ jobs: uses: Ilshidur/action-discord@master with: args: "🚫 Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ matrix.branch }}` failed" - - install-latest: - name: Install latest release - strategy: - matrix: - os: ["ubuntu-latest"] - python: ["3.7", "3.8", "3.9", "3.10", "3.11"] - runs-on: ${{ matrix.os }} - steps: - - name: πŸ‘€ Determine latest release - run: | - OCTOPRINT_VERSION=$(curl -i https://github.com/OctoPrint/OctoPrint/releases/latest | grep -i location: | head -n1 | awk -F/ '{print $NF}' | tr -d '\r') - echo "OCTOPRINT_VERSION=$OCTOPRINT_VERSION" >> $GITHUB_ENV - - name: 🐍 Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: πŸ‘· Build and install latest release - run: | - pip install https://github.com/OctoPrint/OctoPrint/archive/${{ env.OCTOPRINT_VERSION }}.zip - - name: πŸ“§ Discord success notification - continue-on-error: true - env: - DISCORD_WEBHOOK: ${{ secrets.discord_webhook }} - uses: Ilshidur/action-discord@master - with: - args: "β˜‘οΈ Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ env.OCTOPRINT_VERSION }}` was successful" - - name: πŸ“§ Discord failure notification - continue-on-error: true - if: failure() - env: - DISCORD_WEBHOOK: ${{ secrets.discord_webhook }} - uses: Ilshidur/action-discord@master - with: - args: "🚫 Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ env.OCTOPRINT_VERSION }}` failed" diff --git a/.versioneer-lookup b/.versioneer-lookup index 4f9567d7b..4ea306e50 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -26,8 +26,8 @@ improve/.* 1.10.0 cd955e9a46782119b36cc22b8dea5652ebbf9774 pep440-dev # staging/bugfix is the branch for preparation of the 1.9.x bugfix releases # so are any bug/... branches -staging/bugfix 1.9.3 f027aaa7300f70b046525a49245b33c43dd198c1 pep440-dev -bug/.* 1.9.3 f027aaa7300f70b046525a49245b33c43dd198c1 pep440-dev +staging/bugfix 1.9.4 506648c152681bf4b1416cf2b5aaf97d526ee752 pep440-dev +bug/.* 1.9.4 506648c152681bf4b1416cf2b5aaf97d526ee752 pep440-dev # staging/maintenance is currently the branch for preparation of 1.9.0rc7 # so is regressionfix/... diff --git a/SUPPORTERS.md b/SUPPORTERS.md index 6820f28cd..85403f9bd 100644 --- a/SUPPORTERS.md +++ b/SUPPORTERS.md @@ -10,7 +10,6 @@ thanks to everyone who contributed! * 3DPrinterOS * Al Mucci * Ash King - * Ben Fritsch * BigTreeTech * Boris Hussein * Brad Jackson @@ -18,13 +17,12 @@ thanks to everyone who contributed! * Christian Wolf * Christian WΓΌrthner * Christoph Sigrist - * Creality3D * DeltaMaker 3D Printers * Dennis Breining * Dima Gorbenko - * Douglas Floyd * Ed Crump * Ernesto Martinez + * Fiberpunk * Franziska Kunsmann * Hog Duske * Jacob Renstrom @@ -41,10 +39,10 @@ thanks to everyone who contributed! * Lachlan Bell * Lefteris Lertas * LulzBot - * Makerbase * Makespace Madrid * Mark Greenwald * Mark Walker + * Martin Majewski * Michael Aumock * Michael Badagliacco * Mike Labanov @@ -52,7 +50,6 @@ thanks to everyone who contributed! * Norman Jaffe * Obico * Ory Weaver - * Peopoly * Pete Barnwell * Raise3D * Randy C. Will @@ -64,6 +61,7 @@ thanks to everyone who contributed! * Stefan Krister * Steve Dougherty * Steve Thompson + * Tideline 3D * Ulrich Kempken -and 1970 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)! +and 1918 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)! diff --git a/setup.py b/setup.py index d2c7a08c7..19774303f 100644 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ core_deps = [ "pathvalidate>=2.5.2,<3", "pkginfo>=1.9.6,<2", "psutil>=5.9.4,<6", - "pydantic>=1.10.7,<2", + "pydantic==1.10.12", # to be kept pinned until https://github.com/pydantic/pydantic/issues/7689 is resolved "pylru>=1.2.1,<2", "pyserial>=3.5,<4", "PyYAML>=6.0.1,<7", # changelog at https://github.com/yaml/pyyaml/blob/master/CHANGES diff --git a/src/octoprint/plugins/errortracking/__init__.py b/src/octoprint/plugins/errortracking/__init__.py index a6225ceac..1797bb68f 100644 --- a/src/octoprint/plugins/errortracking/__init__.py +++ b/src/octoprint/plugins/errortracking/__init__.py @@ -18,10 +18,10 @@ from octoprint.util.version import ( ) SENTRY_URL_SERVER = ( - "https://ba4e3d61c37a4d219e1cd81bdc1417a7@o118517.ingest.sentry.io/1373987" + "https://f723fd2a91da40dbae1148193ea49001@o118517.ingest.sentry.io/1373987" ) SENTRY_URL_COREUI = ( - "https://2382252761de4d318e5f83be0816efaa@o118517.ingest.sentry.io/1374096" + "https://a115318be6faed605c6bfde4e183b7a0@o118517.ingest.sentry.io/1374096" ) SETTINGS_DEFAULTS = { diff --git a/src/octoprint/settings/__init__.py b/src/octoprint/settings/__init__.py index c281d8969..e23779884 100644 --- a/src/octoprint/settings/__init__.py +++ b/src/octoprint/settings/__init__.py @@ -641,9 +641,10 @@ class Settings: return folder def _init_script_templating(self): - from jinja2 import BaseLoader, ChoiceLoader, Environment, TemplateNotFound + from jinja2 import BaseLoader, ChoiceLoader, TemplateNotFound from jinja2.ext import Extension from jinja2.nodes import Include + from jinja2.sandbox import SandboxedEnvironment from octoprint.util.jinja import FilteredFileSystemLoader @@ -712,9 +713,9 @@ class Settings: def list_templates(self): return self._default.list_templates() - class RelEnvironment(Environment): + class RelEnvironment(SandboxedEnvironment): def __init__(self, prefix_sep=":", *args, **kwargs): - Environment.__init__(self, *args, **kwargs) + super().__init__(*args, **kwargs) self._prefix_sep = prefix_sep def join_path(self, template, parent):