fix(cli): update hard delete confirmation message in delete cli (#11550)

This commit is contained in:
Harshal Sheth 2024-10-09 08:34:46 -07:00 committed by GitHub
parent 867007f209
commit 576ae8a056
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 5 deletions

View File

@ -338,10 +338,18 @@ def by_filter(
# TODO: add some validation on entity_type
if not force and not soft and not dry_run:
click.confirm(
"This will permanently delete data from DataHub. Do you want to continue?",
abort=True,
)
if only_soft_deleted:
click.confirm(
"This will permanently delete data from DataHub. Do you want to continue?",
abort=True,
)
else:
click.confirm(
"Hard deletion will permanently delete data from DataHub and can be slow. "
"We generally recommend using soft deletes instead. "
"Do you want to continue?",
abort=True,
)
graph = get_default_graph()
logger.info(f"Using {graph}")

View File

@ -8,7 +8,10 @@ if [ "${RUN_QUICKSTART:-true}" == "true" ]; then
source ./run-quickstart.sh
fi
set +x
echo "Activating virtual environment"
source venv/bin/activate
set -x
# set environment variables for the test
source ./set-test-env-vars.sh

View File

@ -5,7 +5,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR"
../gradlew :smoke-test:installDev
set +x
echo "Activating virtual environment"
source venv/bin/activate
set -x
mkdir -p ~/.datahub/plugins/frontend/auth/
echo "test_user:test_pass" >> ~/.datahub/plugins/frontend/auth/user.props
@ -23,4 +26,4 @@ DATAHUB_SEARCH_IMAGE="$DATAHUB_SEARCH_IMAGE" DATAHUB_SEARCH_TAG="$DATAHUB_SEARCH
XPACK_SECURITY_ENABLED="$XPACK_SECURITY_ENABLED" ELASTICSEARCH_USE_SSL="$ELASTICSEARCH_USE_SSL" \
USE_AWS_ELASTICSEARCH="$USE_AWS_ELASTICSEARCH" \
DATAHUB_VERSION=${DATAHUB_VERSION} \
docker compose --project-directory ../docker/profiles --profile quickstart-consumers up -d --quiet-pull --wait --wait-timeout 900
docker compose --project-directory ../docker/profiles --profile quickstart-consumers up -d --quiet-pull --wait --wait-timeout 900