diff --git a/CHANGELOG.md b/CHANGELOG.md index ec20cf013..9b3da3007 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ This file is a running track of new features and fixes to each version of the pa This project follows [Semantic Versioning](http://semver.org) guidelines. +## v1.6.1 +### Fixed +* Fixes server build modifications not being properly persisted to the database when edited. +* Correctly exposes the `oom_disabled` field in the `build` limits block for a server build so that Wings can pick it up. +* ## v1.6.0 ### Fixed * Fixes array merging logic for server transfers that would cause a 500 error to occur in some scenarios. diff --git a/app/Services/Servers/ServerConfigurationStructureService.php b/app/Services/Servers/ServerConfigurationStructureService.php index c94155bf0..8d68d7de8 100644 --- a/app/Services/Servers/ServerConfigurationStructureService.php +++ b/app/Services/Servers/ServerConfigurationStructureService.php @@ -58,9 +58,13 @@ class ServerConfigurationStructureService 'cpu_limit' => $server->cpu, 'threads' => $server->threads, 'disk_space' => $server->disk, + 'oom_disabled' => $server->oom_disabled, ], 'container' => [ 'image' => $server->image, + // This field is deprecated — use the value in the "build" block. + // + // TODO: remove this key in V2. 'oom_disabled' => $server->oom_disabled, 'requires_rebuild' => false, ], diff --git a/app/Transformers/Api/Application/ServerTransformer.php b/app/Transformers/Api/Application/ServerTransformer.php index 9aa3d7b77..d01c7890b 100644 --- a/app/Transformers/Api/Application/ServerTransformer.php +++ b/app/Transformers/Api/Application/ServerTransformer.php @@ -56,6 +56,7 @@ class ServerTransformer extends Transformer 'io' => $model->io, 'cpu' => $model->cpu, 'threads' => $model->threads, + 'oom_disabled' => $model->oom_disabled, ], 'feature_limits' => [ 'databases' => $model->database_limit, @@ -72,7 +73,6 @@ class ServerTransformer extends Transformer 'image' => $model->image, 'environment' => $this->environmentService->handle($model), ], - 'oom_killer' => !$model->oom_disabled, 'updated_at' => self::formatTimestamp($model->updated_at), 'created_at' => self::formatTimestamp($model->created_at), ]; diff --git a/app/Transformers/Api/Client/ServerTransformer.php b/app/Transformers/Api/Client/ServerTransformer.php index cd9385742..664026f84 100644 --- a/app/Transformers/Api/Client/ServerTransformer.php +++ b/app/Transformers/Api/Client/ServerTransformer.php @@ -51,6 +51,8 @@ class ServerTransformer extends Transformer 'disk' => $server->disk, 'io' => $server->io, 'cpu' => $server->cpu, + 'threads' => $server->threads, + 'oom_disabled' => $server->oom_disabled, ], 'invocation' => $this->service->handle($server, $this->user()->cannot(Permission::ACTION_STARTUP_READ, $server)), 'docker_image' => $server->image,