Skip to content

Commit

Permalink
fix(ci): fail cache disk creation if no db version is found (#8987)
Browse files Browse the repository at this point in the history
In some cases Zebra logs might not output the database version, and thus we should avoid creating a disk without a version.

Before this change, a disk was created without a db version number, just indicating a `-v-`, that caused other tests to fail as an actual version was not found in their regexes.
  • Loading branch information
gustavovalverde authored Nov 4, 2024
1 parent 7b31711 commit 75fae66
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/sub-deploy-integration-tests-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,18 +503,19 @@ jobs:
)
if [[ -z "$INITIAL_DISK_DB_VERSION" ]]; then
# Check for new database creation
if echo "$DOCKER_LOGS" | grep -q "creating.new.database"; then
INITIAL_DISK_DB_VERSION="new"
else
echo "Checked logs:"
echo ""
echo "$DOCKER_LOGS"
echo ""
echo "Missing initial disk database version in logs: $INITIAL_DISK_DB_VERSION"
echo "Missing initial disk database version in logs"
# Fail the tests, because Zebra didn't log the initial disk database version,
# or the regex in this step is wrong.
false
exit 1
fi
if [[ "$INITIAL_DISK_DB_VERSION" = "creating.new.database" ]]; then
INITIAL_DISK_DB_VERSION="new"
else
INITIAL_DISK_DB_VERSION="v${INITIAL_DISK_DB_VERSION//./-}"
fi
Expand All @@ -538,7 +539,7 @@ jobs:
echo "Missing running database version in logs: $RUNNING_DB_VERSION"
# Fail the tests, because Zebra didn't log the running database version,
# or the regex in this step is wrong.
false
exit 1
fi
RUNNING_DB_VERSION="v${RUNNING_DB_VERSION//./-}"
Expand Down

0 comments on commit 75fae66

Please sign in to comment.