From d145dd595bac7677902115504e88961b9b2ec65a Mon Sep 17 00:00:00 2001 From: Zedifus Date: Thu, 8 Aug 2024 21:01:42 +0100 Subject: [PATCH 01/20] Prepare 4.4.4 release base --- CHANGELOG.md | 11 +++++++++++ README.md | 2 +- app/config/version.json | 2 +- sonar-project.properties | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05b9576d..d2cbea30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ # Changelog +## --- [4.4.4] - 2024/TBD +### New features +TBD +### Bug fixes +TBD +### Tweaks +TBD +### Lang +TBD +

+ ## --- [4.4.3] - 2024/08/08 ### Bug fixes - Fix schedules creation fail due to missing action ID ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/791)) diff --git a/README.md b/README.md index 01f54c2a..c4b7ad56 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Crafty Logo](app/frontend/static/assets/images/logo_long.svg)](https://craftycontrol.com) -# Crafty Controller 4.4.3 +# Crafty Controller 4.4.4 > Python based Control Panel for your Minecraft Server ## What is Crafty Controller? diff --git a/app/config/version.json b/app/config/version.json index d5cecc2c..4ae818ef 100644 --- a/app/config/version.json +++ b/app/config/version.json @@ -1,5 +1,5 @@ { "major": 4, "minor": 4, - "sub": 3 + "sub": 4 } diff --git a/sonar-project.properties b/sonar-project.properties index 68b0dd68..466f0a01 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,7 +3,7 @@ sonar.organization=crafty-controller # This is the name and version displayed in the SonarCloud UI. sonar.projectName=Crafty 4 -sonar.projectVersion=4.4.3 +sonar.projectVersion=4.4.4 sonar.python.version=3.9, 3.10, 3.11 sonar.exclusions=app/migrations/**, app/frontend/static/assets/vendors/** From 40f753162ffe1b92048a8400bd438ddc4cb1ea44 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 13 Aug 2024 00:12:22 -0400 Subject: [PATCH 02/20] Check for orphan backups on migration --- app/migrations/20240308_multi-backup.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/app/migrations/20240308_multi-backup.py b/app/migrations/20240308_multi-backup.py index 56e01a5c..97ee8ce7 100644 --- a/app/migrations/20240308_multi-backup.py +++ b/app/migrations/20240308_multi-backup.py @@ -13,9 +13,9 @@ from app.classes.shared.file_helpers import FileHelpers logger = logging.getLogger(__name__) -def is_valid_backup(backup, all_servers): +def is_valid_entry(entry, all_servers): try: - return str(backup.server_id) in all_servers + return str(entry.server_id) in all_servers except (TypeError, peewee.DoesNotExist): return False @@ -161,9 +161,14 @@ def migrate(migrator: Migrator, database, **kwargs): row.server_id for row in Servers.select(Servers.server_id).distinct() ] all_backups = Backups.select() + all_schedules = Schedules.select() Console.info("Cleaning up orphan backups for all servers") valid_backups = [ - backup for backup in all_backups if is_valid_backup(backup, all_servers) + backup for backup in all_backups if is_valid_entry(backup, all_servers) + ] + Console.info("Cleaning up orphan schedules for all servers") + valid_schedules = [ + schedule for schedule in all_schedules if is_valid_entry(schedule, all_servers) ] # Copy data from the existing backups table to the new one for backup in valid_backups: @@ -221,13 +226,19 @@ def migrate(migrator: Migrator, database, **kwargs): Console.debug("Migrations: Dropping backup_path from servers table") migrator.drop_columns("servers", ["backup_path"]) - for schedule in Schedules.select(): + for schedule in valid_schedules: action_id = None if schedule.command == "backup_server": Console.info( f"Migrations: Adding backup ID to task with name {schedule.name}" ) - backup = NewBackups.get(NewBackups.server_id == schedule.server_id) + try: + backup = NewBackups.get(NewBackups.server_id == schedule.server_id) + except: + Console.error( + "Could not find backup with selected server ID. Omitting from register." + ) + continue action_id = backup.backup_id NewSchedules.create( schedule_id=schedule.schedule_id, From 1f5ff5dd5afdb647677d3d931d044dc6160ce7c6 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 14 Sep 2024 13:02:19 -0400 Subject: [PATCH 03/20] Fix logic in bedrock server import frontend --- .../templates/server/bedrock_wizard.html | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/app/frontend/templates/server/bedrock_wizard.html b/app/frontend/templates/server/bedrock_wizard.html index 7c4789f7..e7d7346a 100644 --- a/app/frontend/templates/server/bedrock_wizard.html +++ b/app/frontend/templates/server/bedrock_wizard.html @@ -498,24 +498,19 @@ -{% end %} \ No newline at end of file +{% end %} From eb0670ca42cb74e187a7f2636c01e98219dcb121 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 2 Oct 2024 16:34:29 -0400 Subject: [PATCH 11/20] Lint lint lint! --- app/classes/shared/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/classes/shared/helpers.py b/app/classes/shared/helpers.py index 5a03d04f..0080285e 100644 --- a/app/classes/shared/helpers.py +++ b/app/classes/shared/helpers.py @@ -617,7 +617,7 @@ class Helpers: return version_data def check_migrations(self) -> None: - if self.read_annc == False: + if self.read_annc is False: self.read_annc = True for file in os.listdir( os.path.join(self.root_dir, "app", "migrations", "status") From e637a9705badd102e34800243ac4b936c82a3a77 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Wed, 2 Oct 2024 21:55:36 +0100 Subject: [PATCH 12/20] Update changelog !797 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2cbea30..b0864666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### New features TBD ### Bug fixes -TBD +- Fix logic issue causing bedrock wizard's root files buttons to not respond to user click events ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/797)) ### Tweaks TBD ### Lang From 031ee914097cb7b02901f1b9b43e43a4715136cc Mon Sep 17 00:00:00 2001 From: Zedifus Date: Wed, 2 Oct 2024 22:22:43 +0100 Subject: [PATCH 13/20] Update changelog !798 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0864666..7e86c021 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ TBD ### Bug fixes - Fix logic issue causing bedrock wizard's root files buttons to not respond to user click events ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/797)) +- Reset crash detection counter after crash detection process detects successful start ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/798)) ### Tweaks TBD ### Lang From f0bf9619cdad94a2bfb9cd474694276b72cb0b51 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 2 Oct 2024 17:54:33 -0400 Subject: [PATCH 14/20] Change http response code for creation error --- app/classes/web/routes/api/servers/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/classes/web/routes/api/servers/index.py b/app/classes/web/routes/api/servers/index.py index dac580e8..ae0590a5 100644 --- a/app/classes/web/routes/api/servers/index.py +++ b/app/classes/web/routes/api/servers/index.py @@ -731,7 +731,7 @@ class ApiServersIndexHandler(BaseApiHandler): self.controller.servers.stats.record_stats() self.finish_json( - 200, + 503, { "status": "error", "error": "Could not create server", From 16504c77a8d95554ec016b7faa7e3ff501d272d8 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Wed, 2 Oct 2024 22:55:35 +0100 Subject: [PATCH 15/20] Update changelog !802 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e86c021..719ed850 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ TBD ### Bug fixes - Fix logic issue causing bedrock wizard's root files buttons to not respond to user click events ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/797)) - Reset crash detection counter after crash detection process detects successful start ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/798)) +- Update new bedrock DL url and correctly bubble up exception on DL fail - Thanks @sarcastron ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/802)) ### Tweaks TBD ### Lang From 1123718d3d2c9d54ae76d43037e24ea7c21f8573 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Thu, 3 Oct 2024 01:10:16 +0100 Subject: [PATCH 16/20] Update changelog !796 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 719ed850..d26ff0ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### New features TBD ### Bug fixes +- Migrations | Fix orphan schedule configurations crashing migration operation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/796)) - Fix logic issue causing bedrock wizard's root files buttons to not respond to user click events ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/797)) - Reset crash detection counter after crash detection process detects successful start ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/798)) - Update new bedrock DL url and correctly bubble up exception on DL fail - Thanks @sarcastron ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/802)) From cee88e8e4a1b3e3b233046dbacee05ad8a9e4aff Mon Sep 17 00:00:00 2001 From: Zedifus Date: Thu, 3 Oct 2024 01:22:32 +0100 Subject: [PATCH 17/20] Bump cryptography for GHSA-h4gh-qq45-vh27 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2ca0ff8b..7a9e4c58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ argon2-cffi==23.1.0 cached_property==1.5.2 colorama==0.4.6 croniter==1.4.1 -cryptography==42.0.4 +cryptography==43.0.1 libgravatar==1.0.4 nh3==0.2.14 packaging==23.2 From 402b2040bc4ba932b6f5241c5f6227a9671b7c5a Mon Sep 17 00:00:00 2001 From: Zedifus Date: Thu, 3 Oct 2024 01:27:12 +0100 Subject: [PATCH 18/20] Bump parent dep of crypto --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7a9e4c58..99415099 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ nh3==0.2.14 packaging==23.2 peewee==3.13 psutil==5.9.5 -pyOpenSSL==24.0.0 +pyOpenSSL==24.2.1 pyjwt==2.8.0 PyYAML==6.0.1 requests==2.32.0 From 9f3706e089c74faeb5d7c0dadd56ddc622bdcb84 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Thu, 3 Oct 2024 01:28:44 +0100 Subject: [PATCH 19/20] Update changelog !803 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d26ff0ab..5fc39be9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ TBD - Fix logic issue causing bedrock wizard's root files buttons to not respond to user click events ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/797)) - Reset crash detection counter after crash detection process detects successful start ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/798)) - Update new bedrock DL url and correctly bubble up exception on DL fail - Thanks @sarcastron ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/802)) +- Bump cryptography for GHSA-h4gh-qq45-vh27 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/803)) ### Tweaks TBD ### Lang From 848a7f365cc8719fc640461f84c4c46b95d7eaca Mon Sep 17 00:00:00 2001 From: Zedifus Date: Thu, 3 Oct 2024 02:25:04 +0100 Subject: [PATCH 20/20] Close changelog 4.4.4 --- CHANGELOG.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fc39be9..fba99ec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,11 @@ # Changelog -## --- [4.4.4] - 2024/TBD -### New features -TBD +## --- [4.4.4] - 2024/10/03 ### Bug fixes - Migrations | Fix orphan schedule configurations crashing migration operation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/796)) - Fix logic issue causing bedrock wizard's root files buttons to not respond to user click events ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/797)) - Reset crash detection counter after crash detection process detects successful start ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/798)) - Update new bedrock DL url and correctly bubble up exception on DL fail - Thanks @sarcastron ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/802)) - Bump cryptography for GHSA-h4gh-qq45-vh27 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/803)) -### Tweaks -TBD -### Lang -TBD

## --- [4.4.3] - 2024/08/08