Skip to content

Commit

Permalink
Merge branch 'master' into sync/releng
Browse files Browse the repository at this point in the history
  • Loading branch information
asutosh committed Jul 29, 2022
2 parents 74cc8e5 + 5679edd commit cb32193
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ci/image/Dockerfile
Expand Up @@ -14,7 +14,7 @@ RUN apt-get install -y --no-install-recommends \
libpython3.7 \
python3.7-dev \
python3-pip \
&& pip3 install protobuf grpcio==1.24.0 \
&& pip3 install protobuf==3.20.1 grpcio==1.24.0 \
&& apt-get purge -y build-essential \
&& rm -rf /root/.cache
RUN apt-get autoremove -y
Expand Down
2 changes: 1 addition & 1 deletion ci/images/hybrid/Dockerfile
Expand Up @@ -7,7 +7,7 @@ RUN apt-get update \
&& apt-get dist-upgrade -y --no-install-recommends redis-server nginx \
python3-setuptools libpython3.7 python3.7-dev curl ca-certificates \
&& curl https://bootstrap.pypa.io/get-pip.py | python3 \
&& pip3 install --only-binary ":all:" grpcio protobuf \
&& pip3 install --only-binary ":all:" grpcio protobuf==3.20.1 \
&& apt-get autoremove -y \
&& rm -rf /usr/include/* && rm /usr/lib/*-linux-gnu/*.a && rm /usr/lib/*-linux-gnu/*.o \
&& rm /usr/lib/python3.7/config-3.7m-*-linux-gnu/*.a \
Expand Down
2 changes: 1 addition & 1 deletion coprocess/python/README.md
Expand Up @@ -119,7 +119,7 @@ curl http://127.0.0.1:8080/coprocess-auth-tyk-api-test/ -H 'Authorization: inval
* [Python 3.x](https://www.python.org/)
* [Go](https://golang.org)
* [Cython](http://cython.org/) (required if you need to modify and re-compile the gateway API binding)
* [protobuf](https://pypi.python.org/pypi/protobuf/3.0.0) (Python module): `pip3 install protobuf`
* [protobuf](https://pypi.python.org/pypi/protobuf/3.20.1) (Python module): `pip3 install protobuf==3.20.1`
* [grpc](https://www.grpc.io/) (gRPC module): `pip3 install grpcio`

## Build steps
Expand Down
4 changes: 4 additions & 0 deletions gateway/mw_js_plugin.go
Expand Up @@ -176,6 +176,10 @@ func (d *DynamicMiddleware) ProcessRequest(w http.ResponseWriter, r *http.Reques

// Run the middleware
middlewareClassname := d.MiddlewareClassName
if d.Spec.JSVM.VM == nil {
logger.WithError(err).Error("JSVM isn't enabled, check your gateway settings")
return errors.New("Middleware error"), 500
}
vm := d.Spec.JSVM.VM.Copy()
vm.Interrupt = make(chan func(), 1)
logger.Debug("Running: ", middlewareClassname)
Expand Down

0 comments on commit cb32193

Please sign in to comment.