From 84d7b85b5d665f2ff6b188a707b60ce9d17f17ab Mon Sep 17 00:00:00 2001 From: Klim Todrik Date: Mon, 25 Nov 2024 10:01:47 +0100 Subject: [PATCH] Fix/kafka view creation (#401) * Fix Kafka View creation * Improve dev compose to use CLI mysql command without any params --------- Co-authored-by: djklim87 --- composer.lock | 82 +++++++++---------- docker-compose-dev.yml | 2 +- .../Queue/Handlers/View/CreateViewHandler.php | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/composer.lock b/composer.lock index e8b763f3..e38bd64a 100644 --- a/composer.lock +++ b/composer.lock @@ -157,16 +157,16 @@ }, { "name": "composer/composer", - "version": "2.8.2", + "version": "2.8.3", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "6e543d03187c882ea1c6ba43add2467754427803" + "reference": "2a7c71266b2545a3bed9f4860734081963f6e688" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/6e543d03187c882ea1c6ba43add2467754427803", - "reference": "6e543d03187c882ea1c6ba43add2467754427803", + "url": "https://api.github.com/repos/composer/composer/zipball/2a7c71266b2545a3bed9f4860734081963f6e688", + "reference": "2a7c71266b2545a3bed9f4860734081963f6e688", "shasum": "" }, "require": { @@ -180,7 +180,7 @@ "justinrainbow/json-schema": "^5.3", "php": "^7.2.5 || ^8.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^3.2", + "react/promise": "^2.11 || ^3.2", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.2", "seld/signal-handler": "^2.0", @@ -251,7 +251,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.8.2" + "source": "https://github.com/composer/composer/tree/2.8.3" }, "funding": [ { @@ -267,7 +267,7 @@ "type": "tidelift" } ], - "time": "2024-10-29T15:12:11+00:00" + "time": "2024-11-17T12:13:04+00:00" }, { "name": "composer/metadata-minifier", @@ -1612,16 +1612,16 @@ }, { "name": "symfony/console", - "version": "v6.4.14", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "897c2441ed4eec8a8a2c37b943427d24dba3f26b" + "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/897c2441ed4eec8a8a2c37b943427d24dba3f26b", - "reference": "897c2441ed4eec8a8a2c37b943427d24dba3f26b", + "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", "shasum": "" }, "require": { @@ -1686,7 +1686,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.14" + "source": "https://github.com/symfony/console/tree/v6.4.15" }, "funding": [ { @@ -1702,20 +1702,20 @@ "type": "tidelift" } ], - "time": "2024-11-05T15:34:40+00:00" + "time": "2024-11-06T14:19:14+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.4.13", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "728ae8f4e190133ce99d6d5f0bc1e8c8bd7c7a96" + "reference": "70ab1f65a4516ef741e519ea938e6aa465e6aa36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/728ae8f4e190133ce99d6d5f0bc1e8c8bd7c7a96", - "reference": "728ae8f4e190133ce99d6d5f0bc1e8c8bd7c7a96", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/70ab1f65a4516ef741e519ea938e6aa465e6aa36", + "reference": "70ab1f65a4516ef741e519ea938e6aa465e6aa36", "shasum": "" }, "require": { @@ -1767,7 +1767,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.4.13" + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.15" }, "funding": [ { @@ -1783,7 +1783,7 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:07:50+00:00" + "time": "2024-11-09T06:56:25+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2598,16 +2598,16 @@ }, { "name": "symfony/process", - "version": "v6.4.14", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "25214adbb0996d18112548de20c281be9f27279f" + "reference": "3cb242f059c14ae08591c5c4087d1fe443564392" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/25214adbb0996d18112548de20c281be9f27279f", - "reference": "25214adbb0996d18112548de20c281be9f27279f", + "url": "https://api.github.com/repos/symfony/process/zipball/3cb242f059c14ae08591c5c4087d1fe443564392", + "reference": "3cb242f059c14ae08591c5c4087d1fe443564392", "shasum": "" }, "require": { @@ -2639,7 +2639,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.14" + "source": "https://github.com/symfony/process/tree/v6.4.15" }, "funding": [ { @@ -2655,7 +2655,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T09:25:01+00:00" + "time": "2024-11-06T14:19:14+00:00" }, { "name": "symfony/service-contracts", @@ -2742,16 +2742,16 @@ }, { "name": "symfony/string", - "version": "v6.4.13", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "38371c60c71c72b3d64d8d76f6b1bb81a2cc3627" + "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/38371c60c71c72b3d64d8d76f6b1bb81a2cc3627", - "reference": "38371c60c71c72b3d64d8d76f6b1bb81a2cc3627", + "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", + "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", "shasum": "" }, "require": { @@ -2808,7 +2808,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.13" + "source": "https://github.com/symfony/string/tree/v6.4.15" }, "funding": [ { @@ -2824,7 +2824,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2024-11-13T13:31:12+00:00" }, { "name": "symfony/var-exporter", @@ -3376,16 +3376,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.10", + "version": "1.12.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "fc463b5d0fe906dcf19689be692c65c50406a071" + "reference": "0d1fc20a962a91be578bcfe7cf939e6e1a2ff733" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/fc463b5d0fe906dcf19689be692c65c50406a071", - "reference": "fc463b5d0fe906dcf19689be692c65c50406a071", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d1fc20a962a91be578bcfe7cf939e6e1a2ff733", + "reference": "0d1fc20a962a91be578bcfe7cf939e6e1a2ff733", "shasum": "" }, "require": { @@ -3430,7 +3430,7 @@ "type": "github" } ], - "time": "2024-11-11T15:37:09+00:00" + "time": "2024-11-17T14:08:01+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4884,16 +4884,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.11.0", + "version": "3.11.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "70c08f8d20c0eb4fe56f26644dd94dae76a7f450" + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/70c08f8d20c0eb4fe56f26644dd94dae76a7f450", - "reference": "70c08f8d20c0eb4fe56f26644dd94dae76a7f450", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", "shasum": "" }, "require": { @@ -4960,7 +4960,7 @@ "type": "open_collective" } ], - "time": "2024-11-12T09:53:29+00:00" + "time": "2024-11-16T12:02:36+00:00" }, { "name": "swoole/ide-helper", diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index b0995a4e..86d423e2 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -29,7 +29,7 @@ services: entrypoint: - "/bin/sh" - "-c" - - "grep buddy_path /etc/manticoresearch/manticore.conf > /dev/null 2>&1 || sed -i '/searchd {/a \\ buddy_path = manticore-executor /workdir/src/main.php --debugv' /etc/manticoresearch/manticore.conf; exec /bin/bash" + - "grep buddy_path /etc/manticoresearch/manticore.conf > /dev/null 2>&1 || sed -i '/searchd {/a \\ buddy_path = manticore-executor /workdir/src/main.php --debugv' /etc/manticoresearch/manticore.conf && sed -i '/^searchd {/a \\ listen = /var/run/mysqld/mysqld.sock:mysql41' /etc/manticoresearch/manticore.conf; exec /bin/bash" working_dir: "/workdir" networks: - app-network diff --git a/src/Plugin/Queue/Handlers/View/CreateViewHandler.php b/src/Plugin/Queue/Handlers/View/CreateViewHandler.php index a353fe27..82fd15ef 100644 --- a/src/Plugin/Queue/Handlers/View/CreateViewHandler.php +++ b/src/Plugin/Queue/Handlers/View/CreateViewHandler.php @@ -142,7 +142,7 @@ public function run(): Task { $result = $manticoreClient->sendRequest($sql)->getResult(); - if (is_array($result[0]) && empty($result['data'])) { + if (is_array($result[0]) && empty($result[0]['data'])) { throw ManticoreSearchClientError::create('Chosen source not exist'); }