From ed4a2646fb4e2904892c895580192987242834c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 31 Jul 2023 12:18:39 +0200 Subject: [PATCH 1/3] Update bug_report.yml Make it EXTRA clear that "I'm currently printing" is not a reason to not test in safe mode before opening a bug report! --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d9a9f7578..2eaaa85dd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -71,7 +71,7 @@ body: required: true - type: input attributes: - label: If you could not test in safe mode, please state why + label: If you could not test in safe mode, please state why ("currently printing" is NOT an excuse!) description: >- Issues caused by a third party plugin are a major cause of bugs reported here, so we really need to rule out that a plugin is at fault here. [Safe mode](https://docs.octoprint.org/en/master/features/safemode.html) is an easy way to do that. Only skip safe mode @@ -79,7 +79,7 @@ body: too long" or "I have a long print running right now" are **not** a reason to skip testing in safe mode, neither is "I do not know how to enable it" as you can find info on that [here](https://docs.octoprint.org/en/master/features/safemode.html). - If you really *cannot* test in safe mode at all, leave a short explanation as to why. If you,can but just not right now, then wait with reporting until you can. + If you really *cannot* test in safe mode at all, leave a short explanation as to why. If you can but just not right now, then wait with reporting until you can! - type: markdown attributes: value: | From 25d9c44d55af0c96718edb89727c0ce581bf8815 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:09:57 +0200 Subject: [PATCH 2/3] Bump actions/checkout from 3 to 4 (#4884) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 10 +++++----- .github/workflows/nightly_merge.yml | 2 +- .github/workflows/test_install.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50fcc7cf8..4308a9245 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: name: ๐Ÿ”จ Build distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: ๐Ÿ— Set up Python 3.7 @@ -34,7 +34,7 @@ jobs: name: ๐Ÿงน Pre-commit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: ๐Ÿ— Set up Python 3.7 uses: actions/setup-python@v4 with: @@ -53,7 +53,7 @@ jobs: python: ["3.7", "3.8", "3.9", "3.10", "3.11"] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: ๐Ÿ— Set up Python ${{ matrix.python }} uses: actions/setup-python@v4 with: @@ -70,7 +70,7 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: ๐Ÿ— Set up test dependencies run: | npm -g install node-qunit-puppeteer@2.1.0 @@ -112,7 +112,7 @@ jobs: runs-on: ubuntu-latest steps: - name: โฌ‡ Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: โฌ‡ Download build result uses: actions/download-artifact@v3 diff --git a/.github/workflows/nightly_merge.yml b/.github/workflows/nightly_merge.yml index d12689240..d971ab841 100644 --- a/.github/workflows/nightly_merge.yml +++ b/.github/workflows/nightly_merge.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: โฌ‡ Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 7976d1be2..a908de3c6 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -23,7 +23,7 @@ jobs: with: python-version: ${{ matrix.python }} - name: โฌ‡ Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} fetch-depth: 0 From 5ca7f07cb7f094fb031072a291be8c44c33a438b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 9 Oct 2023 10:13:40 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=91=B7=20Include=20server=20run=20in?= =?UTF-8?q?=20test=20install=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test_install.yml | 81 ++++++++++++++++-------------- 1 file changed, 44 insertions(+), 37 deletions(-) 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"