From 49cd9d3283c3ef42e4523eafa33375c5d96e8100 Mon Sep 17 00:00:00 2001
From: Brian Vanderbusch
Date: Sat, 14 Nov 2020 13:55:24 -0600
Subject: [PATCH 05/14] update Trigger docker build workflow
set payload event-type key to use value from event.action
---
.github/workflows/trigger_docker.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/trigger_docker.yml b/.github/workflows/trigger_docker.yml
index ef39f5868..5f5c57251 100644
--- a/.github/workflows/trigger_docker.yml
+++ b/.github/workflows/trigger_docker.yml
@@ -14,5 +14,5 @@ jobs:
with:
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
repository: ${{ github.repository_owner }}/octoprint-docker
- event-type: 'release'
+ event-type: github.event.action
client-payload: '{"tag_name": "${{ github.event.release.tag_name }}"}'
From 4826200ceca9cede44d596ff9732acbfdd3236fa Mon Sep 17 00:00:00 2001
From: cp2004 <31997505+cp2004@users.noreply.github.com>
Date: Sat, 28 Nov 2020 18:52:05 +0000
Subject: [PATCH 06/14] :bug: Fix a stupid copy paste mistake in virtual M145
---
src/octoprint/plugins/virtual_printer/virtual.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/octoprint/plugins/virtual_printer/virtual.py b/src/octoprint/plugins/virtual_printer/virtual.py
index f11970aa6..125ac477c 100644
--- a/src/octoprint/plugins/virtual_printer/virtual.py
+++ b/src/octoprint/plugins/virtual_printer/virtual.py
@@ -1091,7 +1091,7 @@ class VirtualPrinter(object):
if key == "S":
pass
else:
- self._virtual_eeprom.eeprom["advanced"]["params"][material_no][
+ self._virtual_eeprom.eeprom["material"]["params"][material_no][
key
] = float(value)
From 220979bf682fa1a67b2553227a72a5711e7b6ebe Mon Sep 17 00:00:00 2001
From: Brian Vanderbusch
Date: Sun, 29 Nov 2020 11:25:15 -0600
Subject: [PATCH 07/14] implement CODEOWNERS support
---
.github/CODEOWNERS | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 .github/CODEOWNERS
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 000000000..6fc3832f6
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,9 @@
+# These owners will be the default owners for everything in
+# the repo. Unless a later match takes precedence,
+# @OctoPrint/octoprint-maintainers will be requested for
+# review when someone opens a pull request.
+* @OctoPrint/octoprint-maintainers
+
+# someone from the docker-maintainers team will be requested for review
+# whenever the trigger_docker workflow is changed in a Pull Request
+.github/workflows/trigger_docker.yml @OctoPrint/docker-maintainers
From a74309d650345f8f0abb9be0e6ac88bf8e8a712b Mon Sep 17 00:00:00 2001
From: Brian Vanderbusch
Date: Sun, 29 Nov 2020 11:28:48 -0600
Subject: [PATCH 08/14] remove default assignment
---
.github/CODEOWNERS | 6 ------
1 file changed, 6 deletions(-)
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 6fc3832f6..5311f0fa2 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,9 +1,3 @@
-# These owners will be the default owners for everything in
-# the repo. Unless a later match takes precedence,
-# @OctoPrint/octoprint-maintainers will be requested for
-# review when someone opens a pull request.
-* @OctoPrint/octoprint-maintainers
-
# someone from the docker-maintainers team will be requested for review
# whenever the trigger_docker workflow is changed in a Pull Request
.github/workflows/trigger_docker.yml @OctoPrint/docker-maintainers
From f812b18bc6f3fda8fbcdcf3c83494e227d0cb4d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Mon, 30 Nov 2020 18:49:40 +0100
Subject: [PATCH 09/14] =?UTF-8?q?=F0=9F=94=A7=20Default=20to=201.1.1.1=20f?=
=?UTF-8?q?or=20online=20check?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Less controversial than google's 8.8.8.8
As mentioned in #3840
---
src/octoprint/settings.py | 2 +-
.../templates/snippets/settings/server/serverOnlineCheck.jinja2 | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py
index a97c75d0c..02f4c3851 100644
--- a/src/octoprint/settings.py
+++ b/src/octoprint/settings.py
@@ -221,7 +221,7 @@ default_settings = {
"onlineCheck": {
"enabled": None,
"interval": 15 * 60, # 15 min
- "host": "8.8.8.8",
+ "host": "1.1.1.1",
"port": 53,
"name": "octoprint.org",
},
diff --git a/src/octoprint/templates/snippets/settings/server/serverOnlineCheck.jinja2 b/src/octoprint/templates/snippets/settings/server/serverOnlineCheck.jinja2
index 9d3816710..09758944c 100644
--- a/src/octoprint/templates/snippets/settings/server/serverOnlineCheck.jinja2
+++ b/src/octoprint/templates/snippets/settings/server/serverOnlineCheck.jinja2
@@ -5,7 +5,7 @@
{% trans %}
Define a check interval, a host and a port to check against. If you don't know what to set here, the
- default values (using Google's DNS server) should work. If you have concerns about using
+ default values (using Cloudflare's DNS server) should work. If you have concerns about using
that, define the IP and port of a different online server that you trust and that has a high
availability.
{% endtrans %}
From a23daa7c812557afba42bb55877b64943272fec6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Thu, 3 Dec 2020 17:39:11 +0100
Subject: [PATCH 10/14] =?UTF-8?q?=F0=9F=94=96=20staging/hotfix=20is=201.5.?=
=?UTF-8?q?1.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 2ca573de6..4cfcae8ff 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.4.2 hotfix release
-staging/hotfix 1.4.2 3ab84ed7e4c3aaaf71fe0f184b465f25d689f929 pep440-dev
+# staging/hotfix is the branch for preparation of the 1.5.1 hotfix release
+staging/hotfix 1.5.1 f67c15a9a47794a68be9aed4f2d5a12a87e70179 pep440-dev
# staging/maintenance is currently the branch for preparation of 1.5.0rc4
# so is regressionfix/...
From 9f9d0fc7889e776c479ad7bc9c7e542748ba3a07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Thu, 3 Dec 2020 17:18:05 +0100
Subject: [PATCH 11/14] =?UTF-8?q?=F0=9F=90=9B=20Discovery:=20Never=20annou?=
=?UTF-8?q?nce=20loopback=20addresses?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Possible fix for #3852
---
src/octoprint/util/net.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/octoprint/util/net.py b/src/octoprint/util/net.py
index 82c05bd28..63ec8ac02 100644
--- a/src/octoprint/util/net.py
+++ b/src/octoprint/util/net.py
@@ -184,7 +184,8 @@ def interface_addresses(family=None, interfaces=None):
continue
if family in ifaddresses:
for ifaddress in ifaddresses[family]:
- if not ifaddress["addr"].startswith("169.254."):
+ address = netaddr.IPAddress(ifaddress["addr"])
+ if not address.is_link_local() and not address.is_loopback():
yield ifaddress["addr"]
From 1536ed6da32c96e95cfddbd56394504126c74102 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Thu, 3 Dec 2020 17:58:52 +0100
Subject: [PATCH 12/14] =?UTF-8?q?=F0=9F=90=9B=20Fix=20folder=20listing=20o?=
=?UTF-8?q?n=20files=20API?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Children were not being included without the recursive parameter when it
should in fact only have been grandchildren and later generations.
Closes #3844
---
src/octoprint/filemanager/storage.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/octoprint/filemanager/storage.py b/src/octoprint/filemanager/storage.py
index 6428d8893..a09b804ee 100644
--- a/src/octoprint/filemanager/storage.py
+++ b/src/octoprint/filemanager/storage.py
@@ -647,6 +647,15 @@ class LocalFileStorage(StorageInterface):
result[key] = node
return result
+ def strip_grandchildren(nodes):
+ result = {}
+ for key, node in nodes.items():
+ if node["type"] == "folder":
+ node = copy.copy(node)
+ node["children"] = strip_children(node["children"])
+ result[key] = node
+ return result
+
def apply_filter(nodes, filter_func):
result = {}
for key, node in nodes.items():
@@ -654,14 +663,14 @@ class LocalFileStorage(StorageInterface):
if node["type"] == "folder":
node = copy.copy(node)
node["children"] = apply_filter(
- node.get("children", []), filter_func
+ node.get("children", {}), filter_func
)
result[key] = node
return result
result = self._list_folder(path, base=base, force_refresh=force_refresh)
if not recursive:
- result = strip_children(result)
+ result = strip_grandchildren(result)
if callable(filter):
result = apply_filter(result, filter)
return result
From 82dd94d51b4134f05d34c9dd9199dcb839514c79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Thu, 3 Dec 2020 18:28:26 +0100
Subject: [PATCH 13/14] =?UTF-8?q?=F0=9F=90=9B=20Better=20fix=20for=20folde?=
=?UTF-8?q?r=20listing=20on=20files=20API?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We don't want children to be included on api/files or api/files/origin,
but we do want them on api/files/origin/path as that gets taken from
a file listing itself. So a level parameter is introduced on the storage
interface, defaulting to 0 and thus the former behaviour (remove
children), but setting it to a value > 0 will only remove grand children
and thus give us a way to query what we want on the detail endpoint.
See #3844
---
src/octoprint/filemanager/__init__.py | 7 ++++++-
src/octoprint/filemanager/storage.py | 13 ++++++++++---
src/octoprint/server/api/files.py | 7 +++++--
3 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/octoprint/filemanager/__init__.py b/src/octoprint/filemanager/__init__.py
index 84ceff1c6..96c3cac83 100644
--- a/src/octoprint/filemanager/__init__.py
+++ b/src/octoprint/filemanager/__init__.py
@@ -675,6 +675,7 @@ class FileManager(object):
path=None,
filter=None,
recursive=None,
+ level=0,
force_refresh=False,
):
if not destinations:
@@ -685,7 +686,11 @@ class FileManager(object):
result = {}
for dst in destinations:
result[dst] = self._storage_managers[dst].list_files(
- path=path, filter=filter, recursive=recursive, force_refresh=force_refresh
+ path=path,
+ filter=filter,
+ recursive=recursive,
+ level=level,
+ force_refresh=force_refresh,
)
return result
diff --git a/src/octoprint/filemanager/storage.py b/src/octoprint/filemanager/storage.py
index a09b804ee..b84218884 100644
--- a/src/octoprint/filemanager/storage.py
+++ b/src/octoprint/filemanager/storage.py
@@ -92,7 +92,9 @@ class StorageInterface(object):
"""
raise NotImplementedError()
- def list_files(self, path=None, filter=None, recursive=True, force_refresh=False):
+ def list_files(
+ self, path=None, filter=None, recursive=True, level=0, force_refresh=False
+ ):
"""
List all files in storage starting at ``path``. If ``recursive`` is set to True (the default), also dives into
subfolders.
@@ -628,7 +630,9 @@ class LocalFileStorage(StorageInterface):
folder_path = os.path.join(path, name)
return os.path.exists(folder_path) and os.path.isdir(folder_path)
- def list_files(self, path=None, filter=None, recursive=True, force_refresh=False):
+ def list_files(
+ self, path=None, filter=None, recursive=True, level=0, force_refresh=False
+ ):
if path:
path = self.sanitize_path(to_unicode(path))
base = self.path_in_storage(path)
@@ -670,7 +674,10 @@ class LocalFileStorage(StorageInterface):
result = self._list_folder(path, base=base, force_refresh=force_refresh)
if not recursive:
- result = strip_grandchildren(result)
+ if level > 0:
+ result = strip_grandchildren(result)
+ else:
+ result = strip_children(result)
if callable(filter):
result = apply_filter(result, filter)
return result
diff --git a/src/octoprint/server/api/files.py b/src/octoprint/server/api/files.py
index 5c033129c..c08699a50 100644
--- a/src/octoprint/server/api/files.py
+++ b/src/octoprint/server/api/files.py
@@ -231,7 +231,7 @@ def readGcodeFile(target, filename):
def _getFileDetails(origin, path, recursive=True):
parent, path = os.path.split(path)
- files = _getFileList(origin, path=parent, recursive=recursive)
+ files = _getFileList(origin, path=parent, recursive=recursive, level=1)
for f in files:
if f["name"] == path:
@@ -245,7 +245,9 @@ def _getFileDetails(origin, path, recursive=True):
message="{func}({func_args},{func_kwargs}) took {timing:.2f}ms",
incl_func_args=True,
)
-def _getFileList(origin, path=None, filter=None, recursive=False, allow_from_cache=True):
+def _getFileList(
+ origin, path=None, filter=None, recursive=False, level=0, allow_from_cache=True
+):
if origin == FileDestinations.SDCARD:
sdFileList = printer.get_sd_files()
@@ -301,6 +303,7 @@ def _getFileList(origin, path=None, filter=None, recursive=False, allow_from_cac
path=path,
filter=filter_func,
recursive=recursive,
+ level=level,
force_refresh=not allow_from_cache,
)[origin].values()
)
From c111054fd6b6e6b3e6a53f63825a823f6808f3e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Fri, 4 Dec 2020 10:37:15 +0100
Subject: [PATCH 14/14] =?UTF-8?q?=F0=9F=94=96=20Preparing=20release=20of?=
=?UTF-8?q?=201.5.1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SUPPORTERS.md | 3 ++-
src/octoprint/plugins/errortracking/__init__.py | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/SUPPORTERS.md b/SUPPORTERS.md
index c7d1ab3fd..aebbe465b 100644
--- a/SUPPORTERS.md
+++ b/SUPPORTERS.md
@@ -18,6 +18,7 @@ thanks to everyone who contributed!
* D Brian Kimmel
* DeltaMaker 3D Printers
* Dennis Breining
+ * Eric Berry
* Eric Betts
* Ernesto Martinez
* Franziska Kunsmann
@@ -68,4 +69,4 @@ thanks to everyone who contributed!
* Sven Mueller
* Ulrich Kempken
-and 2116 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
+and 2118 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 d5c0d9619..5a9ce56a3 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://53f015cb6c3046088019baed6ff5b653@o118517.ingest.sentry.io/1373987"
+ "https://09f22353fe6b4b9785e33bf76613ed83@o118517.ingest.sentry.io/1373987"
)
SENTRY_URL_COREUI = (
- "https://993cc8f6848b4ccca8c66be5769ccb50@o118517.ingest.sentry.io/1374096"
+ "https://5ec92c365d914fb6a0dd3a3f1a51b502@o118517.ingest.sentry.io/1374096"
)
SETTINGS_DEFAULTS = {