From 52df39e3cc6bbfe37e5f673de31032e848ff197b Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Thu, 25 Aug 2022 11:11:35 +0200 Subject: [PATCH] fix(ci): Image names with underscores in search queries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub updated their Ubuntu 22.04 runner image to 20220821.1, which bumped Compose from v2.6.1 to v2.9.0. Compose v2.8.0 introduced a breaking change where the name of certain resources — such as images — are created with hyphens '-' instead of underscores '_'. Ref. https://docs.docker.com/compose/release-notes/#280 --- .github/workflows/scripts/run-tests-logspout.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/run-tests-logspout.sh b/.github/workflows/scripts/run-tests-logspout.sh index ea1748b..4bf0047 100755 --- a/.github/workflows/scripts/run-tests-logspout.sh +++ b/.github/workflows/scripts/run-tests-logspout.sh @@ -28,7 +28,7 @@ poll_ready "$cid_lsp" "http://${ip_lsp}/health" # 2021/01/07 16:14:52 # logspout v3.2.13-custom by gliderlabs # # which we expect to find by querying: -# docker.image:"docker-elk_logspout" AND message:"logspout gliderlabs"~3 +# docker.image:"docker-elk-logspout" AND message:"logspout gliderlabs"~3 # log 'Searching a log entry forwarded by Logspout' @@ -39,7 +39,7 @@ declare -i was_retried=0 # retry for max 60s (30*2s) for _ in $(seq 1 30); do - response="$(curl "http://${ip_es}:9200/logs-generic-default/_search?q=docker.image:%22docker-elk_logspout%22%20AND%20message:%22logspout%20gliderlabs%22~3&pretty" -s -u elastic:testpasswd)" + response="$(curl "http://${ip_es}:9200/logs-generic-default/_search?q=docker.image:%22docker-elk-logspout%22%20AND%20message:%22logspout%20gliderlabs%22~3&pretty" -s -u elastic:testpasswd)" set +u # prevent "unbound variable" if assigned value is not an integer count="$(jq -rn --argjson data "${response}" '$data.hits.total.value')"