remove brotli from packaging and CI images (#3673)

* Revert "add brotli shared lib to packager image (#2924)"
This reverts commit 79414cb225.
* remove unneeded dockerfile
* remove brotli traces in ci images and compression test
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
This commit is contained in:
Tirumarai Selvan 2020-01-11 02:45:47 +05:30 committed by Alexis King
parent 02d13ba164
commit 66beb02f7b
12 changed files with 16 additions and 67 deletions

View File

@ -7,14 +7,12 @@ RUN go get github.com/mitchellh/gox \
&& go get github.com/hasura/go-bindata/go-bindata \
&& go get github.com/tcnksm/ghr
# install UPX, netcat and brotli
# install UPX and netcat
RUN apt-get update && apt-get install -y \
xz-utils netcat libpq5 postgresql-client git cmake pkgconf \
xz-utils netcat libpq5 postgresql-client \
&& curl -Lo /tmp/upx-${upx_version}.tar.xz https://github.com/upx/upx/releases/download/v${upx_version}/upx-${upx_version}-amd64_linux.tar.xz \
&& xz -d -c /tmp/upx-${upx_version}.tar.xz \
| tar -xOf - upx-${upx_version}-amd64_linux/upx > /bin/upx \
&& chmod a+x /bin/upx \
&& git clone https://github.com/google/brotli.git && cd brotli && mkdir out && cd out && ../configure-cmake \
&& make && make test && make install && ldconfig \
&& apt-get -y auto-remove \
&& rm -rf /var/lib/apt/lists/*

View File

@ -130,7 +130,7 @@ jobs:
# changes only contains files in .ciignore
check_build_worthiness:
docker:
- image: hasura/graphql-engine-cli-builder:v0.4
- image: hasura/graphql-engine-cli-builder:20191205
working_directory: ~/graphql-engine
steps:
- attach_workspace:
@ -147,7 +147,7 @@ jobs:
# build the server binary, and package into docker image
build_server:
docker:
- image: hasura/graphql-engine-server-builder:20190826
- image: hasura/graphql-engine-server-builder:20200110
resource_class: large
working_directory: ~/graphql-engine
steps:
@ -225,7 +225,7 @@ jobs:
PG_VERSION: "12"
POSTGIS_VERSION: "3.0.0"
docker:
- image: hasura/graphql-engine-server-builder:20190826
- image: hasura/graphql-engine-server-builder:20200110
- image: hasura/postgres-12.0-alpine-postgis3:6cbd863d47c0
<<: *test_pg_env
@ -234,7 +234,7 @@ jobs:
environment:
PG_VERSION: "11"
docker:
- image: hasura/graphql-engine-server-builder:20190826
- image: hasura/graphql-engine-server-builder:20200110
- image: circleci/postgres:11-alpine-postgis
<<: *test_pg_env
@ -243,7 +243,7 @@ jobs:
environment:
PG_VERSION: "10"
docker:
- image: hasura/graphql-engine-server-builder:20190826
- image: hasura/graphql-engine-server-builder:20200110
- image: circleci/postgres:10-alpine-postgis
<<: *test_pg_env
@ -252,7 +252,7 @@ jobs:
environment:
PG_VERSION: "9_6"
docker:
- image: hasura/graphql-engine-server-builder:20190826
- image: hasura/graphql-engine-server-builder:20200110
- image: circleci/postgres:9.6-alpine-postgis
<<: *test_pg_env
@ -261,14 +261,14 @@ jobs:
environment:
PG_VERSION: "9_5"
docker:
- image: hasura/graphql-engine-server-builder:20190826
- image: hasura/graphql-engine-server-builder:20200110
- image: circleci/postgres:9.5-alpine-postgis
<<: *test_pg_env
server_unit_tests:
resource_class: large
docker:
- image: hasura/graphql-engine-server-builder:20190826
- image: hasura/graphql-engine-server-builder:20200110
working_directory: ~/graphql-engine
steps:
- attach_workspace:
@ -419,7 +419,7 @@ jobs:
# test console
test_console:
docker:
- image: hasura/graphql-engine-console-builder:v0.4
- image: hasura/graphql-engine-console-builder:v0.3
environment:
CYPRESS_KEY: 983be0db-0f19-40cc-bfc4-194fcacd85e1
GHCRTS: -N1
@ -456,7 +456,7 @@ jobs:
# test server upgrade from last version to current build
test_server_upgrade:
docker:
- image: hasura/graphql-engine-upgrade-tester:v0.5
- image: hasura/graphql-engine-upgrade-tester:v0.4
environment:
HASURA_GRAPHQL_DATABASE_URL: postgresql://gql_test:@localhost:5432/gql_test
- image: circleci/postgres:10-alpine

View File

@ -16,14 +16,9 @@ RUN apt-get update && apt-get install -y \
libxss1 \
libasound2 \
xvfb \
git \
cmake \
pkgconf \
&& curl -Lo /tmp/gcloud-${gcloud_version}.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${gcloud_version}-linux-x86_64.tar.gz \
&& tar -xzf /tmp/gcloud-${gcloud_version}.tar.gz -C /usr/local \
&& /usr/local/google-cloud-sdk/install.sh \
&& git clone https://github.com/google/brotli.git && cd brotli && mkdir out && cd out && ../configure-cmake \
&& make && make test && make install && ldconfig \
&& apt-get -y auto-remove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \

View File

@ -9,7 +9,7 @@ ARG postgres_ver="11"
# Install GNU make, curl, git and docker client. Required to build the server
RUN apt-get -y update \
&& apt-get -y install curl gnupg2 cmake pkgconf \
&& apt-get -y install curl gnupg2 \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get -y update \
@ -17,8 +17,6 @@ RUN apt-get -y update \
&& curl -Lo /tmp/docker-${docker_ver}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${docker_ver}.tgz \
&& tar -xz -C /tmp -f /tmp/docker-${docker_ver}.tgz \
&& mv /tmp/docker/* /usr/bin \
&& git clone https://github.com/google/brotli.git && cd brotli && mkdir out && cd out && ../configure-cmake \
&& make && make test && make install && ldconfig \
&& curl -sL https://github.com/commercialhaskell/stack/releases/download/v${stack_ver}/stack-${stack_ver}-linux-x86_64.tar.gz \
| tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack' \
&& stack --resolver ${resolver} setup \

View File

@ -3,9 +3,4 @@ FROM node:11-slim
RUN apt-get update && apt-get install -y \
libpq5 \
netcat \
git \
cmake \
pkgconf \
&& curl -L https://github.com/hasura/graphql-engine/raw/master/cli/get.sh | INSTALL_PATH=/bin bash \
&& git clone https://github.com/google/brotli.git && cd brotli && mkdir out && cd out && ../configure-cmake \
&& make && make test && make install && ldconfig \
&& curl -L https://github.com/hasura/graphql-engine/raw/master/cli/get.sh | INSTALL_PATH=/bin bash

View File

@ -6,7 +6,7 @@ nproc := $(shell nproc)
# TODO: needs to be replaced with something like yq
stack_resolver := $(shell awk '/^resolver:/ {print $$2;}' stack.yaml)
packager_ver := 20190923
packager_ver := 20190731
pg_dump_ver := 12
project_dir := $(shell pwd)
build_dir := $(project_dir)/$(shell stack path --dist-dir)/build

View File

@ -1,14 +1,8 @@
FROM hasura/haskell-docker-packager:20190731
MAINTAINER vamshi@hasura.io
RUN apt-get update && apt-get install -y libpq5 upx git cmake pkgconf \
RUN apt-get update && apt-get install -y libpq5 upx \
&& update-ca-certificates \
&& mkdir -p /usr/src/busybox/rootfs/etc/ssl/certs \
&& cp -L /etc/ssl/certs/* /usr/src/busybox/rootfs/etc/ssl/certs/ \
&& git clone https://github.com/google/brotli.git && cd brotli && mkdir out && cd out && ../configure-cmake \
&& make && make test && make install && ldconfig && cd ../../ \
&& rm -rf brotli \
&& cp /usr/local/lib/libbrotlienc.so.1 /usr/src/busybox/rootfs/usr/lib/x86_64-linux-gnu \
&& cp /usr/local/lib/libbrotlidec.so.1 /usr/src/busybox/rootfs/usr/lib/x86_64-linux-gnu \
&& cp /usr/local/lib/libbrotlicommon.so.1 /usr/src/busybox/rootfs/usr/lib/x86_64-linux-gnu \
&& rm -rf /var/lib/apt/lists/*

View File

@ -1,7 +0,0 @@
FROM fpco/stack-build:lts-13.20
# Install brotli dependencies
RUN apt-get -y update \
&& apt-get -y install cmake pkgconf \
&& git clone https://github.com/google/brotli.git && cd brotli && mkdir out && cd out && ../configure-cmake \
&& make && make test && make install && ldconfig

View File

@ -58,7 +58,3 @@ extra-package-dbs: []
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
docker:
enable: false
repo: 'hasura/stack-build'

View File

@ -9,6 +9,5 @@ pyjwt >= 1.5.3
jsondiff
cryptography
graphene
brotlipy
ruamel.yaml > 0.15
graphql-core

View File

@ -2,7 +2,6 @@ aniso8601==7.0.0
apipkg==1.5
atomicwrites==1.3.0
attrs==19.3.0
brotlipy==0.7.0
certifi==2019.9.11
cffi==1.13.2
chardet==3.0.4

View File

@ -9,8 +9,6 @@ from super_classes import DefaultTestSelectQueries
class TestCompression(DefaultTestSelectQueries):
gzip_header = {'Accept-Encoding': 'gzip'}
brotli_header = {'Accept-Encoding': 'br'}
gzip_brotli_header = {'Accept-Encoding': 'gzip, br'}
def _make_post(self, hge_ctx, u, q, h):
if hge_ctx.hge_key is not None:
@ -47,11 +45,6 @@ class TestCompression(DefaultTestSelectQueries):
self._assert_encoding(resp.headers, 'gzip')
self._assert_resp(resp, exp_resp)
def _assert_brotli(self, resp, exp_resp):
self._assert_status_code_200(resp)
self._assert_encoding(resp.headers, 'br')
self._assert_resp(resp, exp_resp)
def test_gzip_compression_graphql(self, hge_ctx):
url, q, exp_resp = self._get_config(self.dir() + '/graphql_query.yaml')
resp = self._make_post(hge_ctx, url, q, self.gzip_header)
@ -62,17 +55,6 @@ class TestCompression(DefaultTestSelectQueries):
resp = self._make_post(hge_ctx, url, q, self.gzip_header)
self._assert_gzip(resp, exp_resp)
def test_gzip_brotli_graphql_query(self, hge_ctx):
url, q, exp_resp = self._get_config(self.dir() + '/graphql_query.yaml')
resp = self._make_post(hge_ctx, url, q, self.gzip_brotli_header)
self._assert_gzip(resp, exp_resp)
def test_gzip_brotli_v1_query(self, hge_ctx):
url, q, exp_resp = self._get_config(self.dir() + '/v1_query.yaml')
resp = self._make_post(hge_ctx, url, q, self.gzip_brotli_header)
self._assert_gzip(resp, exp_resp)
@classmethod
def dir(cls):
return 'queries/compression'