Skip to content

Commit f9a70fc

Browse files
committed
Merge branch 'develop' for v4.10.0
2 parents bf8fa0a + 2ba9a56 commit f9a70fc

File tree

8 files changed

+116
-92
lines changed

8 files changed

+116
-92
lines changed

.github/workflows/test_and_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
strategy:
9393
fail-fast: false
9494
matrix:
95-
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
95+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
9696
steps:
9797
- name: Check out source code
9898
uses: actions/checkout@v3

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.9.3
1+
4.10.0

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
"easyengine/auth-command": "v1.2.1",
3636
"easyengine/config-command": "v1.1.0",
3737
"easyengine/cron-command": "v2.1.0",
38-
"easyengine/dash-command": "v1.0.0",
38+
"easyengine/dash-command": "v1.0.1",
3939
"easyengine/log-command": "v1.1.0",
4040
"easyengine/mailhog-command": "v1.0.3",
4141
"easyengine/service-command": "v1.6.2",
4242
"easyengine/shell-command": "v1.1.3",
43-
"easyengine/site-command": "v3.6.1",
44-
"easyengine/site-type-php": "v1.9.3",
45-
"easyengine/site-type-wp": "v1.9.1",
43+
"easyengine/site-command": "v3.7.1",
44+
"easyengine/site-type-php": "v1.10.0",
45+
"easyengine/site-type-wp": "v1.10.0",
4646
"monolog/monolog": "1.24.0",
4747
"mustache/mustache": "2.14.1",
4848
"rmccue/requests": "^2.0",

composer.lock

Lines changed: 62 additions & 73 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

img-versions.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"easyengine/cron": "v4.9.1",
2+
"easyengine/cron": "v4.10.0",
33
"easyengine/mailhog": "v4.6.5",
44
"easyengine/mariadb": "v4.9.1",
5-
"easyengine/nginx-proxy": "v4.9.1",
5+
"easyengine/nginx-proxy": "v4.10.0",
66
"easyengine/nginx": "v4.7.6",
77
"easyengine/php": "v4.6.6",
88
"easyengine/php5.6": "v4.7.4",
@@ -13,9 +13,10 @@
1313
"easyengine/php8.0": "v4.8.1",
1414
"easyengine/php8.1": "v4.9.0",
1515
"easyengine/php8.2": "v4.9.1",
16-
"easyengine/php8.3": "v4.9.1",
17-
"easyengine/php8.4": "v4.9.1",
16+
"easyengine/php8.3": "v4.10.0",
17+
"easyengine/php8.4": "v4.10.0",
18+
"easyengine/php8.5": "v4.10.0",
1819
"easyengine/postfix": "v4.8.1",
19-
"easyengine/redis": "v4.9.1",
20-
"easyengine/newrelic-daemon": "v4.9.0"
20+
"easyengine/redis": "v4.10.0",
21+
"easyengine/newrelic-daemon": "v4.10.0"
2122
}

migrations/db/20181016052850_easyengine_insert_docker_images_version.php

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use EE;
66
use EE\Migration\Base;
7+
use Symfony\Component\Process\Process;
78

89
class InsertDockerImagesVersion extends Base {
910

@@ -37,18 +38,50 @@ public function up() {
3738
'easyengine/php7.2',
3839
'easyengine/php7.3',
3940
'easyengine/php7.4',
41+
'easyengine/php',
4042
'easyengine/php8.0',
4143
'easyengine/php8.1',
44+
'easyengine/mailhog',
4245
'easyengine/newrelic-daemon',
4346
];
47+
48+
$pull_queue = [];
4449
foreach ( $images as $image => $tag ) {
4550
if ( in_array( $image, $skip_download ) ) {
4651
continue;
4752
}
48-
EE::log( "Checking and Pulling docker image $image:$tag" );
49-
if ( ! \EE::exec( "docker pull ${image}:${tag}", true, true ) ) {
50-
throw new \Exception( "Unable to pull ${image}:${tag}. Please check logs for more details." );
53+
$pull_queue[] = [ $image, $tag ];
54+
}
55+
56+
$concurrency = 4;
57+
$running = [];
58+
$successful_pulls = [];
59+
60+
while ( ! empty( $pull_queue ) || ! empty( $running ) ) {
61+
// Start new processes if under concurrency limit
62+
while ( count( $running ) < $concurrency && ! empty( $pull_queue ) ) {
63+
list( $image, $tag ) = array_shift( $pull_queue );
64+
EE::log( "Checking and Pulling docker image $image:$tag" );
65+
$process = new Process( [ 'docker', 'pull', "$image:$tag" ] );
66+
$process->start();
67+
$running[] = [ $process, $image, $tag ];
5168
}
69+
70+
// Check for finished processes
71+
foreach ( $running as $key => list( $process, $image, $tag ) ) {
72+
if ( ! $process->isRunning() ) {
73+
if ( ! $process->isSuccessful() ) {
74+
throw new \Exception( "Unable to pull $image:$tag: " . $process->getErrorOutput() );
75+
}
76+
$successful_pulls[] = [ $image, $tag ];
77+
unset( $running[ $key ] );
78+
}
79+
}
80+
81+
usleep( 100000 ); // Sleep 100ms to avoid busy loop
82+
}
83+
84+
foreach ( $successful_pulls as list( $image, $tag ) ) {
5285
$query .= "INSERT INTO options VALUES( '${image}', '${tag}' );";
5386
}
5487

php/EE/Formatter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ private function format( $items, $ascii_pre_colorized = false ) {
156156

157157
if ( 'json' === $this->args['format'] ) {
158158
if ( defined( 'JSON_PARTIAL_OUTPUT_ON_ERROR' ) ) {
159-
echo json_encode( $out, JSON_PARTIAL_OUTPUT_ON_ERROR );
159+
echo json_encode( $out, JSON_PRETTY_PRINT | JSON_PARTIAL_OUTPUT_ON_ERROR );
160160
} else {
161-
echo json_encode( $out );
161+
echo json_encode( $out, JSON_PRETTY_PRINT );
162162
}
163163
} elseif ( 'yaml' === $this->args['format'] ) {
164164
echo Spyc::YAMLDump( $out, 2, 0 );
@@ -200,7 +200,7 @@ private function show_single_field( $items, $field ) {
200200
}
201201

202202
if ( 'json' == $this->args['format'] ) {
203-
echo json_encode( $values );
203+
echo json_encode( $values, JSON_PRETTY_PRINT );
204204
}
205205
}
206206

php/EE/Migration/Containers.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public static function start_container_migration() {
3939
'easyengine/php8.2',
4040
'easyengine/php8.3',
4141
'easyengine/php8.4',
42+
'easyengine/php8.5',
4243
'easyengine/newrelic-daemon',
4344
];
4445

@@ -140,7 +141,7 @@ public static function update_docker_compose() {
140141
$fs = new Filesystem();
141142
if ( ! $fs->exists( EE_BACKUP_DIR ) ) {
142143
$fs->mkdir( EE_BACKUP_DIR );
143-
}
144+
}
144145
$fs->copy( $docker_compose_path, $docker_compose_backup_path );
145146

146147
EE::exec( "curl -L https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-$(uname -s)-$(uname -m) -o $docker_compose_new_path && chmod +x $docker_compose_new_path" );

0 commit comments

Comments
 (0)