fix(terminal): distinguish containers across servers

Namespace terminal container targets by server UUID and bump Coolify to 4.3.11.
This commit is contained in:
Andras Bacsai 2026-08-21 13:55:54 +02:00
parent dd90926583
commit e82843ac39
6 changed files with 45 additions and 6 deletions

View file

@ -47,7 +47,7 @@ private function getAllActiveContainers()
return [ return [
'name' => data_get($container, 'Names'), 'name' => data_get($container, 'Names'),
'connection_name' => data_get($container, 'Names'), 'connection_name' => data_get($container, 'Names'),
'uuid' => data_get($container, 'Names'), 'uuid' => $server->uuid.':'.data_get($container, 'Names'),
'status' => data_get_str($container, 'State')->lower(), 'status' => data_get_str($container, 'State')->lower(),
'server' => $server, 'server' => $server,
'server_uuid' => $server->uuid, 'server_uuid' => $server->uuid,

View file

@ -2,7 +2,7 @@
return [ return [
'coolify' => [ 'coolify' => [
'version' => env('COOLIFY_VERSION') ?: '4.3.10', 'version' => env('COOLIFY_VERSION') ?: '4.3.11',
'helper_version' => '1.0.15', 'helper_version' => '1.0.15',
'realtime_version' => '1.0.17', 'realtime_version' => '1.0.17',
'railpack_version' => '0.23.0', 'railpack_version' => '0.23.0',

View file

@ -1,7 +1,7 @@
{ {
"coolify": { "coolify": {
"v4": { "v4": {
"version": "4.3.10" "version": "4.3.11"
}, },
"nightly": { "nightly": {
"version": "4.4-rc.1" "version": "4.4-rc.1"

View file

@ -0,0 +1,39 @@
<?php
use App\Livewire\Terminal\Index;
use App\Models\Server;
use Illuminate\Support\Collection;
function terminalServer(string $uuid, string $name, array $containers): Server
{
$server = Mockery::mock(Server::class)->makePartial();
$server->forceFill(['uuid' => $uuid, 'name' => $name]);
$server->shouldReceive('isFunctional')->once()->andReturnTrue();
$server->shouldReceive('loadAllContainers')->once()->andReturn(collect($containers));
return $server;
}
it('keeps containers with the same name on different servers as distinct terminal targets', function () {
$component = new Index;
$component->servers = new Collection([
terminalServer('pulse-uuid', 'Pulse', [
['Names' => 'coolify-proxy', 'State' => 'running'],
['Names' => 'coolify-sentinel', 'State' => 'running'],
]),
terminalServer('forge-uuid', 'Forge', [
['Names' => 'coolify-proxy', 'State' => 'running'],
['Names' => 'coolify-sentinel', 'State' => 'running'],
]),
]);
$component->loadContainers();
expect($component->containers)->toHaveCount(4)
->and(collect($component->containers)->pluck('uuid')->all())->toBe([
'pulse-uuid:coolify-proxy',
'forge-uuid:coolify-proxy',
'pulse-uuid:coolify-sentinel',
'forge-uuid:coolify-sentinel',
]);
});

View file

@ -23,8 +23,8 @@
->toContain('ARG COOLIFY_VERSION') ->toContain('ARG COOLIFY_VERSION')
->toContain('ENV COOLIFY_VERSION=${COOLIFY_VERSION}') ->toContain('ENV COOLIFY_VERSION=${COOLIFY_VERSION}')
->and($constants) ->and($constants)
->toContain("'version' => env('COOLIFY_VERSION') ?: '4.3.10'") ->toContain("'version' => env('COOLIFY_VERSION') ?: '4.3.11'")
->and($versions['coolify']['v4']['version'])->toBe('4.3.10') ->and($versions['coolify']['v4']['version'])->toBe('4.3.11')
->and($versions['coolify']['nightly']['version'])->toBe('4.4-rc.1') ->and($versions['coolify']['nightly']['version'])->toBe('4.4-rc.1')
->and($nightlyVersions)->toBe($versions); ->and($nightlyVersions)->toBe($versions);
}); });

View file

@ -1,7 +1,7 @@
{ {
"coolify": { "coolify": {
"v4": { "v4": {
"version": "4.3.10" "version": "4.3.11"
}, },
"nightly": { "nightly": {
"version": "4.4-rc.1" "version": "4.4-rc.1"