From fe5efaf1eaaa194994382116c7cb85f81f3072eb Mon Sep 17 00:00:00 2001 From: Maxim Zhiltsov Date: Mon, 20 Jan 2025 12:27:38 +0300 Subject: [PATCH] Remove redis-cli auth warnings in helm test logs (#8961) Removed warnings about unsafe authentication in Helm test logs `DEBUG shared.fixtures.init:init.py:111 Output (stderr): Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.` --- tests/python/shared/fixtures/init.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/python/shared/fixtures/init.py b/tests/python/shared/fixtures/init.py index b0d5f8a84db0..aa0c4d9ac094 100644 --- a/tests/python/shared/fixtures/init.py +++ b/tests/python/shared/fixtures/init.py @@ -270,9 +270,10 @@ def kube_restore_redis_inmem(): [ "sh", "-c", - 'redis-cli -e -a "${REDIS_PASSWORD}" --scan --pattern "*" |' - 'grep -v "' + r"\|".join(_get_redis_inmem_keys_to_keep()) + '" |' - 'xargs -r redis-cli -e -a "${REDIS_PASSWORD}" del', + 'export REDISCLI_AUTH="${REDIS_PASSWORD}" && ' + 'redis-cli -e --scan --pattern "*" | ' + 'grep -v "' + r"\|".join(_get_redis_inmem_keys_to_keep()) + '" | ' + "xargs -r redis-cli -e del", ] ) @@ -283,7 +284,7 @@ def docker_restore_redis_ondisk(): def kube_restore_redis_ondisk(): kube_exec_redis_ondisk( - ["sh", "-c", 'redis-cli -e -p 6666 -a "${CVAT_REDIS_ONDISK_PASSWORD}" flushall'] + ["sh", "-c", 'REDISCLI_AUTH="${CVAT_REDIS_ONDISK_PASSWORD}" redis-cli -e -p 6666 flushall'] )