Skip to content

Commit

Permalink
Merge branch 'astronomer:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dwolfeu authored Nov 13, 2024
2 parents 5f15b39 + 8ec46d2 commit b0bb651
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aenum
apache-airflow==2.10.2
apache-airflow~=2.10.3
PyAthena==3.9.0
redshift-connector==2.1.3
fsspec==2024.6.1
Expand Down
17 changes: 17 additions & 0 deletions scripts/test/kubernetes-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ kind load docker-image dbt-jaffle-shop:1.0.0
# The output is filtered to get the first pod's name
POD_NAME=$(kubectl get pods -n default -l app=postgres -o jsonpath='{.items[0].metadata.name}')

# Wait for the PostgreSQL pod to be in the 'Running' and 'Ready' state
echo "Waiting for PostgreSQL pod to be ready..."
while true; do
POD_STATUS=$(kubectl get pod "$POD_NAME" -n default -o jsonpath='{.status.phase}')

if [ "$POD_STATUS" = "Running" ] && [ "$(kubectl get pod "$POD_NAME" -n default -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}')" = "True" ]; then
echo "PostgreSQL pod is up and running!"
break
elif [ "$POD_STATUS" = "Error" ]; then
echo "Error: PostgreSQL pod failed to start. Exiting..."
kubectl describe pod "$POD_NAME" -n default # Show details for debugging
exit 1
else
echo "Pod $POD_NAME is not ready yet (status: $POD_STATUS). Waiting..."
sleep 5
fi
done
# Print the name of the PostgreSQL pod
echo "$POD_NAME"

Expand Down

0 comments on commit b0bb651

Please sign in to comment.