Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5a5b7f2
python to manage e2e dependencies
pyalex Oct 22, 2020
51a7f11
all tests running
pyalex Oct 22, 2020
dafe895
run tests on github action
pyalex Oct 23, 2020
0bd30cc
fixing e2e action
pyalex Oct 23, 2020
3e93b5f
pass version as option
pyalex Oct 23, 2020
ef30da1
setup python
pyalex Oct 23, 2020
d054591
setup python
pyalex Oct 23, 2020
43d3641
setup python
pyalex Oct 23, 2020
e16543c
pass feast version
pyalex Oct 23, 2020
82ebdf3
python style
pyalex Oct 23, 2020
cba58d6
fix make python
pyalex Oct 23, 2020
4c40307
fixes for 3.6
pyalex Oct 23, 2020
4c6b9b4
add missing fixtures
pyalex Oct 23, 2020
6e2a847
test with setuid
pyalex Oct 23, 2020
d198d2f
use provided postgres
pyalex Oct 23, 2020
4959565
use postgres host
pyalex Oct 23, 2020
6255772
debug
pyalex Oct 23, 2020
51d39cc
debug
pyalex Oct 23, 2020
c29fd20
debug
pyalex Oct 23, 2020
8596aad
try set uid
pyalex Oct 23, 2020
f5cb160
patch postgres executor
pyalex Oct 23, 2020
cbf0ef4
patch postgres executor
pyalex Oct 23, 2020
b8951ac
install postgres
pyalex Oct 23, 2020
8a085bf
always set uid
pyalex Oct 23, 2020
0fd02b8
su
pyalex Oct 23, 2020
85fbb03
debug
pyalex Oct 23, 2020
8cc59b6
debug
pyalex Oct 23, 2020
d1f4fb6
debug
pyalex Oct 23, 2020
3389dbe
pass PATH
pyalex Oct 23, 2020
96a6b50
pass HOME
pyalex Oct 23, 2020
e04cd9f
external services fixtures
pyalex Oct 25, 2020
e07f713
gcp tests
pyalex Oct 25, 2020
dbf1ad1
fix test requirements install
pyalex Oct 25, 2020
93e9393
fixing tests requirements
pyalex Oct 25, 2020
2b65977
fixing tests requirements
pyalex Oct 25, 2020
ee69301
make historical test storage agnostic
pyalex Oct 25, 2020
07eaf08
unify test options
pyalex Oct 25, 2020
6eadb67
fix noopredis init
pyalex Oct 25, 2020
54946ac
fix streaming test
pyalex Oct 25, 2020
1dd9768
gcp test
pyalex Oct 26, 2020
e5e983e
lint
pyalex Oct 26, 2020
adaa91c
test scopes
pyalex Oct 26, 2020
6b16c7a
add dataproc to ci requiremenets
pyalex Oct 26, 2020
ce63eca
zookeper fixture
pyalex Oct 26, 2020
d5ab3dc
freeze grpcio
pyalex Oct 26, 2020
6beb7dc
return pytest requirements to ci
pyalex Oct 26, 2020
41793b9
freeze google sdk
pyalex Oct 26, 2020
e1dd22e
fix dataproc cancel
pyalex Oct 26, 2020
26fd919
check kafka consumers before publish
pyalex Oct 26, 2020
84833b3
enable tests with auth
pyalex Oct 26, 2020
b07c8a4
wait for job to stop
pyalex Oct 26, 2020
3fbcb6a
unique kafka topic name per test
pyalex Oct 26, 2020
9a18ed5
upgrade kafka python
pyalex Oct 26, 2020
e6ef09a
format
pyalex Oct 26, 2020
c5e3952
use redis cluster in gcp tests
pyalex Oct 27, 2020
ac26fb2
e2e redis internal lb
pyalex Oct 27, 2020
d063045
pass redis cluster config to serving
pyalex Oct 27, 2020
a58ed22
pass redis cluster config to serving
pyalex Oct 27, 2020
031c8ba
handle kafka admin incorrect parsing
pyalex Oct 27, 2020
5f706cf
format
pyalex Oct 27, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/complete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,54 @@ jobs:
- name: copy to gs
run: gsutil cp ./spark/ingestion/target/feast-ingestion-spark-${GITHUB_SHA}.jar gs://feast-jobs/spark/ingestion/

test-end-to-end:
runs-on: [self-hosted]

@woop woop Oct 25, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The self-hosted runners don't clean up. If you aren't using docker then all the state will remain. I dont think this test is safe, it's going to fall over for our current runners because they are already so unstable (long running stateful pods)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use docker. It's regular test, which github runner was designed for, hence there should be way to easily clean up. Right now for example python w/ environment (and installed packages) being cleaned up by python action

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we're on preemptible nodes right now. So we have additional clean up

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use docker. It's regular test, which github runner was designed for, hence there should be way to easily clean up. Right now for example python w/ environment (and installed packages) being cleaned up by python action

ok, but self-hosted runners don't clean up right? state just hangs around as far as I know.

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: stCarolas/setup-maven@v3
with:
maven-version: 3.6.3
- uses: actions/setup-python@v2
with:
python-version: 3.6
- name: install
run: |
apt-get update && apt-get install -y redis-server postgresql libpq-dev
make build-java-no-tests REVISION=develop
python -m pip install --upgrade pip setuptools wheel
make install-python
python -m pip install -qr tests/requirements.txt
- name: run tests
run: su -p postgres -c "PATH=$PATH HOME=/tmp pytest tests/e2e/ --feast-version develop"

test-end-to-end-gcp:
runs-on: [self-hosted]
env:
DISABLE_SERVICE_FIXTURES: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: stCarolas/setup-maven@v3
with:
maven-version: 3.6.3
- uses: actions/setup-python@v2
with:
python-version: 3.6
- name: install
run: |
apt-get update && apt-get install -y redis-server postgresql libpq-dev
make build-java-no-tests REVISION=develop
python -m pip install --upgrade pip setuptools wheel
make install-python
python -m pip install -qr tests/requirements.txt
- name: run tests
run: >
su -p postgres -c "PATH=$PATH HOME=/tmp pytest tests/e2e/
--feast-version develop --env=gcloud --dataproc-cluster-name feast-e2e
--dataproc-project kf-feast --dataproc-region us-central1
--redis-url 10.128.0.105:6379 --redis-cluster --kafka-brokers 10.128.0.103:9094"
112 changes: 0 additions & 112 deletions .prow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,118 +141,6 @@ presubmits:
- image: golang:1.13
command: ["infra/scripts/test-golang-sdk.sh"]

- name: test-end-to-end
decorate: true
always_run: true
spec:
containers:
- image: maven:3.6-jdk-11
command: ["infra/scripts/test-end-to-end.sh"]
resources:
requests:
cpu: "6"
memory: "6144Mi"
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/gcloud/service-account.json
volumeMounts:
- mountPath: /etc/gcloud/service-account.json
name: service-account
readOnly: true
subPath: service-account.json
volumes:
- name: service-account
secret:
secretName: feast-service-account
skip_branches:
- ^v0\.(3|4)-branch$

- name: test-end-to-end-auth
decorate: true
always_run: true
spec:
containers:
- image: maven:3.6-jdk-11
command: ["infra/scripts/test-end-to-end.sh", "True"]
resources:
requests:
cpu: "6"
memory: "6144Mi"
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/gcloud/service-account.json
volumeMounts:
- mountPath: /etc/gcloud/service-account.json
name: service-account
readOnly: true
subPath: service-account.json
volumes:
- name: service-account
secret:
secretName: feast-service-account
skip_branches:
- ^v0\.(3|4)-branch$

- name: test-end-to-end-redis-cluster
decorate: true
always_run: true
spec:
containers:
- image: maven:3.6-jdk-11
command: ["infra/scripts/test-end-to-end-redis-cluster.sh"]
resources:
requests:
cpu: "6"
memory: "6144Mi"
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/gcloud/service-account.json
volumeMounts:
- mountPath: /etc/gcloud/service-account.json
name: service-account
readOnly: true
subPath: service-account.json
volumes:
- name: service-account
secret:
secretName: feast-service-account
skip_branches:
- ^v0\.(3|4)-branch$

- name: test-end-to-end-java-8
decorate: true
always_run: true
spec:
containers:
- image: maven:3.6-jdk-8
command: ["infra/scripts/test-end-to-end.sh"]
resources:
requests:
cpu: "6"
memory: "6144Mi"
branches:
- ^v0\.(3|4)-branch$

- name: test-end-to-end-batch-java-8
decorate: true
always_run: true
spec:
volumes:
- name: service-account
secret:
secretName: feast-service-account
containers:
- image: maven:3.6-jdk-8
command: ["infra/scripts/test-end-to-end-batch.sh"]
resources:
requests:
cpu: "6"
memory: "6144Mi"
volumeMounts:
- name: service-account
mountPath: "/etc/service-account"
branches:
- ^v0\.(3|4)-branch$

postsubmits:
feast-dev/feast:
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ compile-protos-python: install-python-ci-dependencies
cd ${ROOT_DIR}/protos; python -m grpc_tools.protoc -I. --python_out=../sdk/python/ --grpc_python_out=../sdk/python/ --mypy_out=../sdk/python/ feast/third_party/grpc/health/v1/*.proto

install-python: compile-protos-python
cd sdk/python; python setup.py develop
python -m pip install -e sdk/python

test-python:
pytest --verbose --color=yes sdk/python/tests
Expand All @@ -90,10 +90,10 @@ lint-python:
cd ${ROOT_DIR}/sdk/python; flake8 feast/ tests/
cd ${ROOT_DIR}/sdk/python; black --check feast tests

cd ${ROOT_DIR}/tests/e2e; mypy .
cd ${ROOT_DIR}/tests/e2e; isort . --check-only
cd ${ROOT_DIR}/tests/e2e; flake8 .
cd ${ROOT_DIR}/tests/e2e; black --check .
cd ${ROOT_DIR}/tests; mypy e2e
cd ${ROOT_DIR}/tests; isort e2e --check-only
cd ${ROOT_DIR}/tests; flake8 e2e
cd ${ROOT_DIR}/tests; black --check e2e

# Go SDK

Expand Down
18 changes: 18 additions & 0 deletions infra/scripts/helm/kafka-values.tpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
externalAccess:
enabled: true
service:
loadBalancerIPs:
- $feast_kafka_ip
annotations:
cloud.google.com/load-balancer-type: Internal
loadBalancerSourceRanges:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16

persistence:
enabled: false

zookeeper:
persistence:
enabled: false
17 changes: 17 additions & 0 deletions infra/scripts/helm/redis-cluster-values.tpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cluster:
nodes: 3
replicas: 0
externalAccess:
enabled: true
service:
annotations:
cloud.google.com/load-balancer-type: Internal
loadBalancerIP:
- $feast_redis_1_ip
- $feast_redis_2_ip
- $feast_redis_3_ip

persistence:
enabled: false

usePassword: false
130 changes: 0 additions & 130 deletions infra/scripts/setup-common-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,136 +9,6 @@ install_test_tools() {
apt-get -y install wget netcat kafkacat build-essential
}

install_gcloud_sdk() {
print_banner "Installing Google Cloud SDK"
if [[ ! $(command -v gsutil) ]]; then
CURRENT_DIR=$(dirname "$BASH_SOURCE")
. "${CURRENT_DIR}"/install-google-cloud-sdk.sh
fi

export GOOGLE_APPLICATION_CREDENTIALS
gcloud auth activate-service-account --key-file ${GOOGLE_APPLICATION_CREDENTIALS}
}

install_and_start_local_redis() {
print_banner "Installing and tarting Redis at localhost:6379"
# Allow starting serving in this Maven Docker image. Default set to not allowed.
echo "exit 0" >/usr/sbin/policy-rc.d
apt-get -y install redis-server >/var/log/redis.install.log
redis-server --daemonize yes
redis-cli ping
}

install_and_start_local_redis_cluster() {
print_banner "Installing Redis at localhost:6379"
echo "exit 0" >/usr/sbin/policy-rc.d
${SCRIPTS_DIR}/setup-redis-cluster.sh
redis-cli -c -p 7000 ping
}

install_and_start_local_postgres() {
print_banner "Installing and starting Postgres at localhost:5432"
apt-get -y install postgresql >/var/log/postgresql.install.log
service postgresql start
# Initialize with database: 'postgres', user: 'postgres', password: 'password'
cat <<EOF >/tmp/update-postgres-role.sh
psql -c "ALTER USER postgres PASSWORD 'password';"
EOF
chmod +x /tmp/update-postgres-role.sh
su -s /bin/bash -c /tmp/update-postgres-role.sh postgres
export PGPASSWORD=password
pg_isready
}

install_and_start_local_zookeeper_and_kafka() {
print_banner "Installing and starting Zookeeper at localhost:2181 and Kafka at localhost:9092"
wget -qO- https://www-eu.apache.org/dist/kafka/2.3.0/kafka_2.12-2.3.0.tgz | tar xz
mv kafka_2.12-2.3.0/ /tmp/kafka

nohup /tmp/kafka/bin/zookeeper-server-start.sh /tmp/kafka/config/zookeeper.properties &>/var/log/zookeeper.log 2>&1 &
${SCRIPTS_DIR}/wait-for-it.sh localhost:2181 --timeout=20
tail -n10 /var/log/zookeeper.log

nohup /tmp/kafka/bin/kafka-server-start.sh /tmp/kafka/config/server.properties &>/var/log/kafka.log 2>&1 &
${SCRIPTS_DIR}/wait-for-it.sh localhost:9092 --timeout=40
tail -n10 /var/log/kafka.log
kafkacat -b localhost:9092 -L
}

build_feast_core_and_serving() {
print_banner "Building Feast Core and Feast Serving"
infra/scripts/download-maven-cache.sh \
--archive-uri gs://feast-templocation-kf-feast/.m2.2020-08-19.tar \
--output-dir /root/

# Build jars for Feast
mvn --quiet --batch-mode -Dmaven.javadoc.skip=true -Dgpg.skip -DskipUTs=true clean package

ls -lh core/target/*jar
ls -lh serving/target/*jar
ls -lh job-controller/target/*jar
}

start_feast_core() {
print_banner "Starting Feast Core"

if [ -n "$1" ]; then
echo "Custom Spring application.yml location provided: $1"
export CONFIG_ARG="--spring.config.location=classpath:/application.yml,file://$1"
fi

nohup java -jar core/target/feast-core-$FEAST_BUILD_VERSION-exec.jar $CONFIG_ARG &>/var/log/feast-core.log &
${SCRIPTS_DIR}/wait-for-it.sh localhost:6565 --timeout=90

tail -n10 /var/log/feast-core.log
nc -w2 localhost 6565 </dev/null
}

start_feast_jobcontroller() {
print_banner "Starting Feast Job Controller"

if [ -n "$1" ]; then
echo "Custom Spring application.yml location provided: $1"
export CONFIG_ARG="--spring.config.location=classpath:/application.yml,file://$1"
fi

nohup java -jar job-controller/target/feast-job-controller-$FEAST_BUILD_VERSION-exec.jar $CONFIG_ARG &>/var/log/feast-jobcontroller.log &
${SCRIPTS_DIR}/wait-for-it.sh localhost:6570 --timeout=90

tail -n10 /var/log/feast-jobcontroller.log
nc -w2 localhost 6570 </dev/null
}

start_feast_serving() {
print_banner "Starting Feast Online Serving"

if [ -n "$1" ]; then
echo "Custom Spring application.yml location provided: $1"
export CONFIG_ARG="--spring.config.location=classpath:/application.yml,file://$1"
fi

nohup java -jar serving/target/feast-serving-$FEAST_BUILD_VERSION-exec.jar $CONFIG_ARG &>/var/log/feast-serving-online.log &
${SCRIPTS_DIR}/wait-for-it.sh localhost:6566 --timeout=60

tail -n100 /var/log/feast-serving-online.log
nc -w2 localhost 6566 </dev/null
}

install_python_with_miniconda_and_feast_sdk() {
print_banner "Installing Python 3.7 with Miniconda and Feast SDK"
# Install Python 3.7 with Miniconda
wget -q https://repo.continuum.io/miniconda/Miniconda3-4.7.12-Linux-x86_64.sh \
-O /tmp/miniconda.sh
bash /tmp/miniconda.sh -b -p /root/miniconda -f
/root/miniconda/bin/conda init
source ~/.bashrc

# Install Feast Python SDK and test requirements
make compile-protos-python
pip install -qe sdk/python
pip install -qr tests/e2e/requirements.txt
}

print_banner() {
echo "
============================================================
Expand Down
Loading