Merge branch 'staging/bugfix' into master

This commit is contained in:
Gina Häußge committed 2021-01-19 10:11:47 +01:00
commit 992ef83795
6 files changed
+89 -41

No files matched your search

+4 -2
View File
@@ -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/...
+7 -5
View File
@@ -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)!
+4 -4
View File
@@ -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 ``<x>.<y>.<z+1>`` (e.g. ``1.5.1``) for a current release
of ``<x>.<y>.<z>``.
``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``
@@ -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 = {
+63 -28
View File
@@ -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(
@@ -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