Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/integration sql test failed2 #12

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
42 changes: 30 additions & 12 deletions .github/workflows/ci-integration-sql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,9 @@ jobs:
with:
java-version: 1.8

- name: Set up Maven
uses: aahmed-se/setup-maven@v3
- name: get docker images
if: steps.docs.outputs.changed_only == 'no'
with:
maven-version: 3.6.1

- name: build artifacts and docker image
if: steps.docs.outputs.changed_only == 'no'
run: mvn -B install -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR -Pdocker -DskipTests

- name: clean docker container
if: steps.docs.outputs.changed_only == 'no'
run: docker system prune -f
run: docker images

- name: remove docker node image
if: steps.docs.outputs.changed_only == 'no'
Expand All @@ -68,6 +58,34 @@ jobs:
if: steps.docs.outputs.changed_only == 'no'
run: docker rmi -f jekyll/builder:latest && docker rmi -f mcr.microsoft.com/azure-pipelines/node8-typescript:latest

- name: get space size
if: steps.docs.outputs.changed_only == 'no'
run: df -h

- name: run install by skip tests
if: steps.docs.outputs.changed_only == 'no'
run: mvn clean install -DskipTests

- name: build artifacts and docker pulsar latest test image
if: steps.docs.outputs.changed_only == 'no'
run: mvn -B -f tests/docker-images/pom.xml install -am -Pdocker -DskipTests

- name: get docker images
if: steps.docs.outputs.changed_only == 'no'
run: docker images

- name: get space size
if: steps.docs.outputs.changed_only == 'no'
run: df -h

- name: get space size
if: steps.docs.outputs.changed_only == 'no'
run: df -h

- name: clean docker container
if: steps.docs.outputs.changed_only == 'no'
run: docker system prune -f

- name: run integration tests
if: steps.docs.outputs.changed_only == 'no'
run: mvn -B -f tests/pom.xml test -DintegrationTestSuiteFile=pulsar-sql.xml -DintegrationTests -DredirectTestOutputToFile=false
2 changes: 1 addition & 1 deletion dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN apt-get update
RUN apt-get -y install postgresql python sudo nginx supervisor

# Postgres configuration
COPY conf/postgresql.conf /etc/postgresql/9.6/main/
COPY conf/postgresql.conf /etc/postgresql/11/main/

# Configure nginx and supervisor
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
Expand Down
8 changes: 4 additions & 4 deletions dashboard/conf/postgresql.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ synchronous_commit = off

# Default configs
data_directory = '/data'
hba_file = '/etc/postgresql/9.6/main/pg_hba.conf'
ident_file = '/etc/postgresql/9.6/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/9.6-main.pid'
hba_file = '/etc/postgresql/11/main/pg_hba.conf'
ident_file = '/etc/postgresql/11/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/11-main.pid'

port = 5432
max_connections = 100

datestyle = 'iso, mdy'
default_text_search_config = 'pg_catalog.english'
stats_temp_directory = '/var/run/postgresql/9.6-main.pg_stat_tmp'
stats_temp_directory = '/var/run/postgresql/11-main.pg_stat_tmp'
timezone = 'UTC'
log_timezone = 'UTC'
2 changes: 1 addition & 1 deletion dashboard/init-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -x -e
rm -rf /data/*
chown -R postgres: /data
chmod 700 /data
sudo -u postgres /usr/lib/postgresql/9.6/bin/initdb /data/
sudo -u postgres /usr/lib/postgresql/11/bin/initdb /data/
sudo -u postgres /etc/init.d/postgresql start
sudo -u postgres psql --command "CREATE USER docker WITH PASSWORD 'docker';"
sudo -u postgres createdb -O docker pulsar_dashboard
Expand Down
4 changes: 2 additions & 2 deletions docker/pulsar-standalone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ COPY --from=dashboard /pulsar/conf/* /pulsar/conf/
# Note that the libpq-dev package is needed here in order to install
# the required python psycopg2 package (for postgresql) later
RUN apt-get update
RUN apt-get -y install python2.7 python-pip postgresql-9.6 sudo nginx supervisor libpq-dev
RUN apt-get -y install python2.7 python-pip postgresql sudo nginx supervisor libpq-dev

# Python dependencies
RUN pip2 install -r /pulsar/django/requirements.txt

# Postgres configuration
COPY --from=dashboard /etc/postgresql/9.6/main/postgresql.conf /etc/postgresql/9.6/main/postgresql.conf
COPY --from=dashboard /etc/postgresql/11/main/postgresql.conf /etc/postgresql/11/main/postgresql.conf

# Configure supervisor
COPY --from=dashboard /etc/supervisor/conf.d/supervisor-app.conf /etc/supervisor/conf.d/supervisor-app.conf
Expand Down