From f082739687704920ee876aa1fdf1c6360b48dd62 Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:36:53 +0300 Subject: [PATCH] "Undefined variable $r" during ExApp installs (#376) ``` Undefined variable $r at /var/www/html/apps/app_api/lib/DeployActions/DockerActions.php#249 ``` during usual ExApp install that has not GPU images, only the basic one. Signed-off-by: Alexander Piskun --- lib/DeployActions/DockerActions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/DeployActions/DockerActions.php b/lib/DeployActions/DockerActions.php index 79742dfe..a1f33082 100644 --- a/lib/DeployActions/DockerActions.php +++ b/lib/DeployActions/DockerActions.php @@ -226,6 +226,7 @@ public function pullImage( $this->logger->info(sprintf('Successfully pulled "extended" image in a new name format: %s', $imageId)); return ''; } + $this->logger->info(sprintf('Failed to pull "extended" image(%s): %s', $imageId, $r)); } catch (GuzzleException $e) { $this->logger->info( sprintf('Failed to pull "extended" image(%s), GuzzleException occur: %s', $imageId, $e->getMessage()) @@ -240,17 +241,20 @@ public function pullImage( $this->logger->info(sprintf('Successfully pulled "extended" image in an old name format: %s', $imageId)); return ''; } + $this->logger->info(sprintf('Failed to pull "extended" image(%s): %s', $imageId, $r)); } catch (GuzzleException $e) { $this->logger->info( sprintf('Failed to pull "extended" image(%s), GuzzleException occur: %s', $imageId, $e->getMessage()) ); } } - $this->logger->info(sprintf('Failed to pull "extended" image for %s: %s', $imageId, $r)); $imageId = $this->buildBaseImageName($params); $this->logger->info(sprintf('Pulling "base" image: %s', $imageId)); try { $r = $this->pullImageInternal($dockerUrl, $exApp, $startPercent, $maxPercent, $imageId); + if ($r === '') { + $this->logger->info(sprintf('Image(%s) pulled successfully.', $imageId)); + } } catch (GuzzleException $e) { $r = sprintf('Failed to pull image, GuzzleException occur: %s', $e->getMessage()); }