diff --git a/.versioneer-lookup b/.versioneer-lookup index d01104036..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.2 hotfix release -staging/hotfix 1.5.2 38256815ef6d6dd602e0fac949a17fbf8f30f838 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/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/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`` 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 = { diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py index d732e0b43..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() @@ -671,11 +684,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 +766,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 +787,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( diff --git a/src/octoprint/plugins/pluginmanager/exceptions.py b/src/octoprint/plugins/pluginmanager/exceptions.py new file mode 100644 index 000000000..0b4256018 --- /dev/null +++ b/src/octoprint/plugins/pluginmanager/exceptions.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +from __future__ import absolute_import, division, print_function, unicode_literals + +__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" +__copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" + + +class InvalidPackageFormat(Exception): + pass