Skip to content

Commit 727ec0a

Browse files
author
Chen Zhiling
authored
Extract fs update tests so ci doesn't run it (#709)
* Tag fs update tests separate from direct runner tests * Add prow config
1 parent 1df2e70 commit 727ec0a

3 files changed

Lines changed: 51 additions & 5 deletions

File tree

.prow/config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,27 @@ presubmits:
204204
skip_branches:
205205
- ^v0\.(3|4)-branch$
206206

207+
- name: test-end-to-end-batch-fs-update
208+
decorate: true
209+
always_run: false
210+
spec:
211+
volumes:
212+
- name: service-account
213+
secret:
214+
secretName: feast-service-account
215+
containers:
216+
- image: maven:3.6-jdk-11
217+
command: ["infra/scripts/test-end-to-end-batch.sh", "-m", "fs_update"]
218+
resources:
219+
requests:
220+
cpu: "6"
221+
memory: "6144Mi"
222+
volumeMounts:
223+
- name: service-account
224+
mountPath: "/etc/service-account"
225+
skip_branches:
226+
- ^v0\.(3|4)-branch$
227+
207228
- name: test-end-to-end-batch-java-8
208229
decorate: true
209230
always_run: true

infra/scripts/test-end-to-end-batch.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
set -e
44
set -o pipefail
55

6+
PYTEST_MARK='direct_runner' #default
7+
8+
print_usage() {
9+
printf "Usage: ./test-end-to-end-batch -m pytest_mark"
10+
}
11+
12+
while getopts 'm:' flag; do
13+
case "${flag}" in
14+
m) PYTEST_MARK="${OPTARG}" ;;
15+
*) print_usage
16+
exit 1 ;;
17+
esac
18+
done
19+
620
test -z ${GOOGLE_APPLICATION_CREDENTIALS} && GOOGLE_APPLICATION_CREDENTIALS="/etc/service-account/service-account.json"
721
test -z ${SKIP_BUILD_JARS} && SKIP_BUILD_JARS="false"
822
test -z ${GOOGLE_CLOUD_PROJECT} && GOOGLE_CLOUD_PROJECT="kf-feast"
@@ -254,7 +268,7 @@ ORIGINAL_DIR=$(pwd)
254268
cd tests/e2e
255269

256270
set +e
257-
pytest bq-batch-retrieval.py -m direct_runner --gcs_path "gs://${TEMP_BUCKET}/" --junitxml=${LOGS_ARTIFACT_PATH}/python-sdk-test-report.xml
271+
pytest bq-batch-retrieval.py -m ${PYTEST_MARK} --gcs_path "gs://${TEMP_BUCKET}/" --junitxml=${LOGS_ARTIFACT_PATH}/python-sdk-test-report.xml
258272
TEST_EXIT_CODE=$?
259273

260274
if [[ ${TEST_EXIT_CODE} != 0 ]]; then

tests/e2e/bq-batch-retrieval.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,17 @@ def infra_teardown(pytestconfig, core_url, serving_url):
445445
print("Cleaning up not required")
446446

447447

448+
449+
'''
450+
This suite of tests tests the apply feature set - update feature set - retrieve
451+
event sequence. It ensures that when a feature set is updated, tombstoned features
452+
are no longer retrieved, and added features are null for previously ingested
453+
rows.
454+
455+
It is marked separately because of the length of time required
456+
to perform this test, due to bigquery schema caching for streaming writes.
457+
'''
458+
448459
@pytest.fixture(scope="module")
449460
def update_featureset_dataframe():
450461
n_rows = 10
@@ -461,7 +472,7 @@ def update_featureset_dataframe():
461472
)
462473

463474

464-
@pytest.mark.direct_runner
475+
@pytest.mark.fs_update
465476
@pytest.mark.run(order=20)
466477
def test_update_featureset_apply_featureset_and_ingest_first_subset(
467478
client, update_featureset_dataframe
@@ -494,7 +505,7 @@ def test_update_featureset_apply_featureset_and_ingest_first_subset(
494505
assert output["update_feature2"].to_list() == subset_df["update_feature2"].to_list()
495506

496507

497-
@pytest.mark.direct_runner
508+
@pytest.mark.fs_update
498509
@pytest.mark.timeout(600)
499510
@pytest.mark.run(order=21)
500511
def test_update_featureset_update_featureset_and_ingest_second_subset(
@@ -548,7 +559,7 @@ def test_update_featureset_update_featureset_and_ingest_second_subset(
548559
assert output["update_feature4"].to_list() == subset_df["update_feature4"].to_list()
549560

550561

551-
@pytest.mark.direct_runner
562+
@pytest.mark.fs_update
552563
@pytest.mark.run(order=22)
553564
def test_update_featureset_retrieve_all_fields(client, update_featureset_dataframe):
554565
with pytest.raises(Exception):
@@ -564,7 +575,7 @@ def test_update_featureset_retrieve_all_fields(client, update_featureset_datafra
564575
feature_retrieval_job.result()
565576

566577

567-
@pytest.mark.direct_runner
578+
@pytest.mark.fs_update
568579
@pytest.mark.run(order=23)
569580
def test_update_featureset_retrieve_valid_fields(client, update_featureset_dataframe):
570581
feature_retrieval_job = client.get_batch_features(

0 commit comments

Comments
 (0)