From d42c703e6e7be4dc97e871a9a3868235493fbfba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 10 Dec 2020 14:13:21 +0100 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=94=96=20staging/hotfix=20is=20now=20?= =?UTF-8?q?1.5.3.dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .versioneer-lookup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.versioneer-lookup b/.versioneer-lookup index d01104036..9d6b84025 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -24,8 +24,8 @@ maintenance 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev fix/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev improve/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev -# staging/hotfix is the branch for preparation of the 1.5.2 hotfix release -staging/hotfix 1.5.2 38256815ef6d6dd602e0fac949a17fbf8f30f838 pep440-dev +# staging/hotfix is the branch for preparation of the 1.5.3 hotfix release +staging/hotfix 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev # staging/maintenance is currently the branch for preparation of 1.5.0rc4 # so is regressionfix/... From cacc329a610e9cf56726c175b822ce1e5468212a Mon Sep 17 00:00:00 2001 From: cp2004 <31997505+cp2004@users.noreply.github.com> Date: Sun, 27 Dec 2020 18:30:14 +0000 Subject: [PATCH 2/6] :bug: Fix plugin install errors not being reported to the UI When plugin install went async (4cf2a673c8860304472904cf11d13e2187bc17fd) not all of the responses were caught. This PR changes the rest of the responses to become asynchronous as well. Closes #3849 --- .../plugins/pluginmanager/__init__.py | 50 +++++++++++++------ 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py index d732e0b43..370db223d 100644 --- a/src/octoprint/plugins/pluginmanager/__init__.py +++ b/src/octoprint/plugins/pluginmanager/__init__.py @@ -671,11 +671,19 @@ class PluginManagerPlugin( and not self._settings.get_boolean(["ignore_throttled"]) ): # currently throttled, we refuse to run - return make_response( - "System is currently throttled, refusing to install " - "anything due to possible stability issues", - 409, + error_msg = ( + "System is currently throttled, refusing to install anything" + " due to possible stability isssues" ) + self._logger.error(error_msg) + result = { + "result": False, + "source": source, + "source_type": source_type, + "reason": error_msg, + } + self._send_result_notification("install", result) + return result try: # Py3 @@ -745,11 +753,20 @@ class PluginManagerPlugin( "Looks like the plugin was already installed. Forcing a reinstall." ) force = True - except Exception: - self._logger.exception("Could not install plugin from %s" % source) - return make_response( - "Could not install plugin from URL, see the log for more details", 500 - ) + except Exception as e: + self._logger.exception("Could not install plugin from {}".format(source)) + self._logger.exception("Reason: {}".format(repr(e))) + result = { + "result": False, + "source": source, + "source_type": source_type, + "reason": "Could not install plugin from {}, see the log for more details".format( + source + ), + } + self._send_result_notification("install", result) + return result + else: if force: # We don't use --upgrade here because that will also happily update all our dependencies - we'd rather @@ -757,16 +774,21 @@ class PluginManagerPlugin( pip_args += ["--ignore-installed", "--force-reinstall", "--no-deps"] try: returncode, stdout, stderr = self._call_pip(pip_args) - except Exception: + except Exception as e: self._logger.exception( "Could not install plugin from {}".format(source) ) - return make_response( - "Could not install plugin from source {}, see the log for more details".format( + self._logger.exception("Reason: {}".format(repr(e))) + result = { + "result": False, + "source": source, + "source_type": source_type, + "reason": "Could not install plugin from source {}, see the log for more details".format( source ), - 500, - ) + } + self._send_result_notification("install", result) + return result try: result_line = list( From 44a009fd6f3dafdea4048a0ac5a488550ab7c65b Mon Sep 17 00:00:00 2001 From: Shawn Bruce Date: Wed, 16 Dec 2020 10:19:08 -0500 Subject: [PATCH 3/6] Handle http errors when downloading plugin files. --- .../plugins/pluginmanager/__init__.py | 41 ++++++++++++------- .../plugins/pluginmanager/exceptions.py | 10 +++++ 2 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 src/octoprint/plugins/pluginmanager/exceptions.py diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py index 370db223d..7c86bbabe 100644 --- a/src/octoprint/plugins/pluginmanager/__init__.py +++ b/src/octoprint/plugins/pluginmanager/__init__.py @@ -47,6 +47,8 @@ from octoprint.util.version import ( is_python_compatible, ) +from . import exceptions + try: from os import scandir except ImportError: @@ -633,21 +635,32 @@ class PluginManagerPlugin( ) else: - self._logger.error( - "{} is neither an archive nor a python file, can't install that.".format( - source - ) + raise exceptions.InvalidPackageFormat() + except requests.exceptions.HTTPError as e: + self._logger.error("Could not fetch plugin from server, got {}".format(e)) + result = { + "result": False, + "source": source, + "source_type": source_type, + "reason": "Could not fetch plugin from server, got {}".format(e), + } + self._send_result_notification("install", result) + return result + except exceptions.InvalidPackageFormat: + self._logger.error( + "{} is neither an archive nor a python file, can't install that.".format( + source ) - result = { - "result": False, - "source": source, - "source_type": source_type, - "reason": "Could not install plugin from {}, was neither " - "a plugin archive nor a single file plugin".format(source), - } - self._send_result_notification("install", result) - return result - + ) + result = { + "result": False, + "source": source, + "source_type": source_type, + "reason": "Could not install plugin from {}, was neither " + "a plugin archive nor a single file plugin".format(source), + } + self._send_result_notification("install", result) + return result finally: if folder is not None: folder.cleanup() diff --git a/src/octoprint/plugins/pluginmanager/exceptions.py b/src/octoprint/plugins/pluginmanager/exceptions.py new file mode 100644 index 000000000..deddaafbe --- /dev/null +++ b/src/octoprint/plugins/pluginmanager/exceptions.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +from __future__ import absolute_import, division, print_function, unicode_literals + +__author__ = "Gina Häußge " +__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" +__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" + + +class InvalidPackageFormat(Exception): + pass From 2efc3b841e41803eccc7cf8cb724155b5b0387de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 11 Jan 2021 09:24:04 +0100 Subject: [PATCH 4/6] =?UTF-8?q?=E2=9C=8F=20Fix=20file=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/octoprint/plugins/pluginmanager/exceptions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/octoprint/plugins/pluginmanager/exceptions.py b/src/octoprint/plugins/pluginmanager/exceptions.py index deddaafbe..0b4256018 100644 --- a/src/octoprint/plugins/pluginmanager/exceptions.py +++ b/src/octoprint/plugins/pluginmanager/exceptions.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals -__author__ = "Gina Häußge " __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" -__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" +__copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" class InvalidPackageFormat(Exception): From 93504d983cd0ab1a772e2a48f818064cdda78375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 18 Jan 2021 14:43:51 +0100 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=93=9D=20=20staging/hotfix=20=3D>=20s?= =?UTF-8?q?taging/bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .versioneer-lookup | 6 ++++-- docs/development/branches.rst | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.versioneer-lookup b/.versioneer-lookup index 9d6b84025..d6191b42b 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -24,8 +24,10 @@ maintenance 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev fix/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev improve/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev -# staging/hotfix is the branch for preparation of the 1.5.3 hotfix release -staging/hotfix 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev +# staging/bugfix is the branch for preparation of the 1.5.3 hotfix release +# so are any bug/... branches +staging/bugfix 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev +bug/.* 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev # staging/maintenance is currently the branch for preparation of 1.5.0rc4 # so is regressionfix/... diff --git a/docs/development/branches.rst b/docs/development/branches.rst index d2fef6255..57ec18158 100644 --- a/docs/development/branches.rst +++ b/docs/development/branches.rst @@ -30,8 +30,8 @@ There are three main branches in OctoPrint: There are couple more RC and staging branches that see regular use: -``staging/hotfix`` - Any preparation for potential hotfix releases takes place here. +``staging/bugfix`` + Any preparation for potential bugfix releases takes place here. Version number follows the scheme ``..`` (e.g. ``1.5.1``) for a current release of ``..``. ``rc/maintenance`` @@ -56,8 +56,8 @@ There are couple more RC and staging branches that see regular use: Additionally, from time to time you might see other branches pop up in the repository. Those usually have one of the following prefixes: -``hotfix/...`` - Hotfixes under development that are to be merged into the ``staging/hotfix`` +``bug/...`` + Fixes under development that are to be merged into the ``staging/bugfix`` and later the ``master`` branch. ``fix/...`` Fixes under development that are to be merged into the ``maintenance`` From 5860942967618e424901412e6c41abc103cf64c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 19 Jan 2021 10:10:47 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=94=96=20Preparing=20release=20of=201?= =?UTF-8?q?.5.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SUPPORTERS.md | 12 +++++++----- src/octoprint/plugins/errortracking/__init__.py | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/SUPPORTERS.md b/SUPPORTERS.md index 0f64dedea..46d0e9a1d 100644 --- a/SUPPORTERS.md +++ b/SUPPORTERS.md @@ -6,19 +6,22 @@ thanks to everyone who contributed! ## Patrons & Sponsors + * 3DPrinterOS * Andrew Moorby * Arnljot Arntsen * Ash King * BigTreeTech * Boris Hussein * Brad Jackson + * BRANDON ROBERTSON * BuildBee * Christian Petropolis * Christian Wolf + * Creality3D * D Brian Kimmel * DeltaMaker 3D Printers * Dennis Breining - * Eric Berry + * Diana C Rodriguez * Eric Betts * Ernesto Martinez * Franziska Kunsmann @@ -26,12 +29,10 @@ thanks to everyone who contributed! * Greg Holloway * Hog Duske * Hopewell Medical Acupuncture Center - * Hugh Blemings * jean-claude migneault * Jefferson Hunt * Jeremy Cole * Joe Pasqua - * John Gregory Robinson * Joshua Wills * Justin Kaufman * Kaile Riser @@ -52,13 +53,14 @@ thanks to everyone who contributed! * Mosaic Manufacturing * Neil R. Goldberg * Patrick Glyré - * Patrick McGinnis + * Pete Barnwell * Prof Yuh Wen Chen * Raise3D * Randy C. Will * Ranjib Dey * Richard McGuire * Richard Michaud + * Richard Stocks * Rigid3D * Robert Gusek * Ronald Griehsler @@ -69,4 +71,4 @@ thanks to everyone who contributed! * Sven Mueller * Ulrich Kempken -and 2147 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)! +and 2225 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/src/octoprint/plugins/errortracking/__init__.py b/src/octoprint/plugins/errortracking/__init__.py index 44e8f1ae5..37000bdbb 100644 --- a/src/octoprint/plugins/errortracking/__init__.py +++ b/src/octoprint/plugins/errortracking/__init__.py @@ -21,10 +21,10 @@ from octoprint.util.version import ( ) SENTRY_URL_SERVER = ( - "https://1e1cfca4b230430b82ce56b1fe802437@o118517.ingest.sentry.io/1373987" + "https://c11d13d9e92046bca4691ad1658dc543@o118517.ingest.sentry.io/1373987" ) SENTRY_URL_COREUI = ( - "https://1c5aadba206f46cea250f3ef5066e253@o118517.ingest.sentry.io/1374096" + "https://a987a79a328e405a9545b8a036b420ee@o118517.ingest.sentry.io/1374096" ) SETTINGS_DEFAULTS = {