Skip to content

Commit

Permalink
Update version of manticore and proxy original error on invalid reque…
Browse files Browse the repository at this point in the history
…st received
  • Loading branch information
donhardman committed Feb 9, 2023
1 parent 522b446 commit fba9c8c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Run tests inside docker container
uses: manticoresoftware/addnab-docker-run-action@v3
with:
image: manticoresearch/manticoresearch-buddy-test-kit:5.0.3
image: manticoresearch/manticoresearch-buddy-test-kit:6.0.0
options: -v ${{ github.workspace }}:/workdir --cap-add SYS_ADMIN --security-opt apparmor=unconfined
run: |
# the entrypoint is rewritten so we need to launch searchd manually
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Run PHPCS to check following the standard
uses: manticoresoftware/addnab-docker-run-action@v3
with:
image: manticoresearch/manticoresearch-buddy-test-kit:5.0.3
image: manticoresearch/manticoresearch-buddy-test-kit:6.0.0
options: -v ${{ github.workspace }}:/workdir
run: |
cd /workdir
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Run PHPStan to analyze the codebase
uses: manticoresoftware/addnab-docker-run-action@v3
with:
image: manticoresearch/manticoresearch-buddy-test-kit:5.0.3
image: manticoresearch/manticoresearch-buddy-test-kit:6.0.0
options: -v ${{ github.workspace }}:/workdir
run: |
cd /workdir
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM manticoresearch/manticore-executor:0.6.1-dev
FROM manticoresearch/manticore-executor:0.6.4-dev

ARG TARGET_ARCH="amd64"
ENV MANTICORE_REV="9dcd3f47d12d8c40e20db030d2f2ded6ba57a795"
ENV COLUMNAR_REV='2ca756ce46520d514022d4d145009e362ba9cb74'
ENV EXECUTOR_VERSION="0.6.1-230116-72395b6"
ARG TARGET_ARCH='amd64'
ENV MANTICORE_REV='e66380b80d14a5f9fe30fa5642a16a897ecb9c01'
ENV COLUMNAR_REV='f6df240c690f759f14ffb1c49c401f2b07d4bedf'
ENV EXECUTOR_VERSION='0.6.4-230205-cdc5552'

# Build manticore and columnar first
ENV BUILD_DEPS="curl autoconf automake cmake alpine-sdk openssl-dev bison flex git boost-static boost-dev curl-dev"
Expand All @@ -29,7 +29,7 @@ RUN apk update && \
apk add bash figlet mysql-client curl iproute2 apache2-utils coreutils neovim && \
mv /usr/bin/manticore-executor /usr/bin/manticore-executor-dev && \
ln -sf /usr/bin/manticore-executor-dev /usr/bin/php && \
curl -sSL https://github.com/manticoresoftware/executor/releases/download/v0.6.1/manticore-executor_${EXECUTOR_VERSION}_linux_${TARGET_ARCH}.tar.gz | tar -xzf - && \
curl -sSL https://github.com/manticoresoftware/executor/releases/download/v0.6.4/manticore-executor_${EXECUTOR_VERSION}_linux_${TARGET_ARCH}.tar.gz | tar -xzf - && \
mv manticore-executor_${EXECUTOR_VERSION}_linux_${TARGET_ARCH}/manticore-executor /usr/bin && \
rm -fr manticore-executor_${EXECUTOR_VERSION}_linux_${TARGET_ARCH}

Expand Down
5 changes: 4 additions & 1 deletion src/Network/EventHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Manticoresearch\Buddy\Enum\RequestFormat;
use Manticoresearch\Buddy\Exception\CommandNotAllowed;
use Manticoresearch\Buddy\Exception\GenericError;
use Manticoresearch\Buddy\Exception\InvalidRequestError;
use Manticoresearch\Buddy\Exception\SQLQueryCommandNotSupported;
use Manticoresearch\Buddy\Lib\QueryProcessor;
use Manticoresearch\Buddy\Lib\Task;
Expand Down Expand Up @@ -86,7 +87,9 @@ public static function destroy(): void {
* @return bool
*/
protected static function isCustomError(Throwable $e): bool {
return is_a($e, SQLQueryCommandNotSupported::class) || is_a($e, CommandNotAllowed::class);
return is_a($e, SQLQueryCommandNotSupported::class)
|| is_a($e, CommandNotAllowed::class)
|| is_a($e, InvalidRequestError::class);
}

/**
Expand Down

0 comments on commit fba9c8c

Please sign in to comment.