Skip to content

Commit 1d1dd91

Browse files
authored
Fix for Python Client e2e test to ensure the cleanup command exits cleanly (#983)
* fix(python-client): ensure the cleanup command exits Signed-off-by: Eric Dobroveanu <[email protected]> * chore: update gitignore with venv Signed-off-by: Eric Dobroveanu <[email protected]> --------- Signed-off-by: Eric Dobroveanu <[email protected]>
1 parent f9ce110 commit 1d1dd91

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

clients/python/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/.nox/
66
/.python-version
77
__pycache__/
8+
venv/

scripts/cleanup.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ if [[ -n "$LOCAL" ]]; then
2828

2929
sqlite3 test/config/ml-metadata/metadata.sqlite.db <<<"BEGIN TRANSACTION; $PARTIAL_SQL_CMD"
3030
else
31-
echo 'Cleaning up kubernetes MySQL DB'
31+
echo -n 'Cleaning up kubernetes MySQL DB...'
3232

33-
kubectl exec -n "$MR_NAMESPACE" -it "$(kubectl get pods -l component=db -o jsonpath="{.items[0].metadata.name}" -n "$MR_NAMESPACE")" \
34-
-- mysql -u root -ptest -D "$TEST_DB_NAME" -e "START TRANSACTION; $PARTIAL_SQL_CMD"
33+
kubectl exec -n "$MR_NAMESPACE" \
34+
"$(kubectl get pods -l component=db -o jsonpath="{.items[0].metadata.name}" -n "$MR_NAMESPACE")" \
35+
-- mysql -u root -ptest -D "$TEST_DB_NAME" -e "START TRANSACTION; $PARTIAL_SQL_CMD; COMMIT;"
36+
37+
echo -n 'Done cleaning up kubernetes MySQL DB'
3538
fi

0 commit comments

Comments
 (0)