Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e25a8ba
fix(migration): roll back when a migration step exits through EE::err…
mrrobot47 Oct 23, 2026
6746442
fix(migration): recreate global services one at a time behind a readi…
mrrobot47 Oct 23, 2026
5b935df
fix(migration): pull only images that something uses
mrrobot47 Oct 23, 2026
b204545
fix(migration): install docker-compose only when missing or too old, …
mrrobot47 Oct 23, 2026
026461f
fix(db): create the schema of an empty EasyEngine database
mrrobot47 Oct 23, 2026
ee37124
fix(migration): never restore a docker-compose backup from an earlier…
mrrobot47 Oct 23, 2026
a935f0a
fix(migration): accept a password-protected redis and fractional time…
mrrobot47 Oct 23, 2026
498d20e
fix(migration): report a missing migration file instead of a class-no…
mrrobot47 Oct 23, 2026
40e6464
fix(migration): revert only the docker-compose replacement of the ima…
mrrobot47 Oct 23, 2026
8634458
fix(ee): let a migration step capture exits from EE::runcommand()
mrrobot47 Oct 23, 2026
019901b
fix(migration): update docker-compose before recreating global services
mrrobot47 Oct 23, 2026
7b7e265
fix(migration): check the running proxy config first, bound the compo…
mrrobot47 Oct 23, 2026
e495dcf
fix(migration): check the running proxy config before any global serv…
mrrobot47 Oct 23, 2026
853379a
fix(migration): stop and remove first only the global services docker…
mrrobot47 Oct 23, 2026
95b8944
fix(migration): bound the retries of the docker-compose download
mrrobot47 Oct 23, 2026
2b6a4c7
fix(migration): keep the global compose snapshot of an upgrade that d…
mrrobot47 Oct 23, 2026
8aaa57c
fix(migration): roll back the global services an interrupted attempt …
mrrobot47 Oct 23, 2026
73d60d4
fix(migration): read the global compose snapshot with Spyc, which the…
mrrobot47 Oct 23, 2026
ef097e1
fix(migration): recheck global services an interrupted upgrade recreated
mrrobot47 Oct 23, 2026
b0f1190
fix(migration): record the new tag of a stopped global service only o…
mrrobot47 Oct 23, 2026
e49c44a
fix(migration): keep the networks of stopped containers and the globa…
mrrobot47 Oct 23, 2026
e8b6c7a
fix(migration): move disabled sites' compose files to the new images
mrrobot47 Oct 23, 2026
c9d7b35
fix(migration): neither pull nor redo the upgrade for images only sto…
mrrobot47 Oct 23, 2026
8d5107b
fix(migration): keep a disabled site's failed compose update best-eff…
mrrobot47 Oct 23, 2026
6281803
fix(migration): update stale disabled sites on every run, pin the rol…
mrrobot47 Oct 23, 2026
bd7eb47
fix(migration): clear a finished rollback snapshot when no image changed
mrrobot47 Oct 23, 2026
625d170
fix(migration): bound every readiness probe with a timeout inside the…
mrrobot47 Oct 26, 2026
27fc32f
Merge branch 'fix/upgrade-robustness' into fix/migrate-stopped-and-di…
mrrobot47 Oct 26, 2026
e08a32d
Merge remote-tracking branch 'upstream/develop' into fix/upgrade-robu…
mrrobot47 Nov 4, 2026
53937b9
Merge branch 'fix/upgrade-robustness' into fix/migrate-stopped-and-di…
mrrobot47 Nov 4, 2026
8cbea5b
Merge remote-tracking branch 'upstream/develop' into fix/upgrade-robu…
mrrobot47 Nov 16, 2026
92bedd6
Merge branch 'fix/upgrade-robustness' into fix/migrate-stopped-and-di…
mrrobot47 Nov 16, 2026
49b6955
fix(migration): recreate global services an interrupted upgrade left …
mrrobot47 Nov 16, 2026
fcc7984
Merge branch 'fix/upgrade-robustness' into fix/migrate-stopped-and-di…
mrrobot47 Nov 16, 2026
9b658bf
fix(ee): restore runcommand()'s exit capture and output when the comm…
mrrobot47 Nov 16, 2026
96bd0b5
fix(migration): restore every service the pending marker lists on rol…
mrrobot47 Nov 16, 2026
aeb98cd
Merge branch 'fix/upgrade-robustness' into fix/migrate-stopped-and-di…
mrrobot47 Nov 16, 2026
817733f
fix(migration): skip the pull of images only missing global services use
mrrobot47 Nov 16, 2026
f3f57e8
test(migration): pick an image the migration still pulls for the fail…
mrrobot47 Nov 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -835,19 +835,25 @@ public function theNextImageMigrationPullsAtLeastOneImage()
$parts = explode( ':', $image, 2 );
$running[ $parts[0] ] = isset( $parts[1] ) ? $parts[1] : null;
}
$free = null;
$free = null;
$global = [ 'easyengine/nginx-proxy', 'easyengine/mariadb', 'easyengine/redis', 'easyengine/cron' ];
foreach ( json_decode( file_get_contents( EE_ROOT . '/img-versions.json' ), true ) as $image => $version ) {
// Never pulled by the migration (easyengine/php only since the upgrade fix).
if ( preg_match( '#^easyengine/(php(\d|$)|newrelic-daemon)#', $image ) ) {
continue;
}
// A global service's image is only pulled while it runs: a stopped one keeps its old image, a missing one gets it on creation.
if ( in_array( $image, $global, true ) && ! array_key_exists( $image, $running ) ) {
continue;
}
// Running containers take precedence over the options table, as in the migration.
$current = array_key_exists( $image, $running ) ? $running[ $image ] : self::get_option( $image );
// An image nothing runs or records (no option row: false) isn't pulled since the upgrade fix, so only a tracked stale tag counts.
if ( false !== $current && null !== $current && $current !== $version ) {
return;
}
if ( null === $free && ! array_key_exists( $image, $running ) ) {
// Only a tracked image, so the step doesn't start tracking one (e.g. mailhog) the stack never recorded.
if ( null === $free && false !== $current && ! array_key_exists( $image, $running ) ) {
$free = $image;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

use EE;
use EE\Migration\Base;
use Symfony\Component\Filesystem\Filesystem;

class CheckAndUpdateDockerOne extends Base {

public function __construct() {

parent::__construct();
if ( $this->is_first_execution ) {
$this->skip_this_migration = true;
}
Expand Down Expand Up @@ -48,32 +48,14 @@ public function up() {
}

EE::debug( 'Checking docker-compose version' );
$docker_compose_version = trim( EE::launch( 'docker-compose version --short' )->stdout );
$docker_compose_path = EE::launch( 'command -v docker-compose' )->stdout;
$docker_compose_path = trim( $docker_compose_path );
$docker_compose_backup_path = EE_BACKUP_DIR . '/docker-compose.backup';
$docker_compose_new_path = EE_BACKUP_DIR . '/docker-compose';
$fs = new Filesystem();
if ( ! $fs->exists( EE_BACKUP_DIR ) ) {
$fs->mkdir( EE_BACKUP_DIR );
}
$fs->copy( $docker_compose_path, $docker_compose_backup_path );

if ( version_compare( '1.29.2', $docker_compose_version, '!=' ) ) {
EE::exec( "curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m) -o $docker_compose_new_path && chmod +x $docker_compose_new_path" );
EE::exec( "mv $docker_compose_new_path $docker_compose_path" );
}
// Installs only when docker-compose is missing or too old; it never downgrades.
Containers::update_docker_compose();

// Check the version again post update.
$docker_version = trim( EE::launch( 'docker version --format "{{.Server.Version}}"' )->stdout );
if ( version_compare( $docker_version, '20.10.10', '<' ) ) {
EE::error( 'Docker version should be 20.10.10 or above. Please update Docker and try again.' );
}

$docker_compose_version = trim( EE::launch( 'docker-compose version --short' )->stdout );
if ( version_compare( '1.29.2', $docker_compose_version, '!=' ) ) {
EE::error( 'Docker-compose version should be 1.29.2. Please update Docker-compose and try again.' );
}
}

/**
Expand Down
Loading
Loading