We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40c44b1 commit 3d90a0bCopy full SHA for 3d90a0b
k8s/test.sh
@@ -55,7 +55,11 @@ __safe_migration_rollout() {
55
56
if [ "$exitcode" != "0" ]; then
57
echo "::error::Alembic migration failure. See logs for details"
58
- kubectl logs deployment/$deploy -c $deploy-migrate
+ failed_pod_name=$(kubectl get pod \
59
+ --selector app=$deploy \
60
+ --field-selector status.phase!=Running \
61
+ --output jsonpath='{.items[?(@.metadata.labels.app=="'$deploy'")].metadata.name}')
62
+ kubectl logs $failed_pod_name -c $deploy-migrate
63
if [ "$ENABLE_ALEMBIC_MIGRATIONS" = "true" ]; then
64
downgrade_alembic_migrations
65
fi
0 commit comments