Skip to content

Commit

Permalink
fix(cli): update hard delete confirmation message in delete cli
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Oct 7, 2024
1 parent 7bdb7bb commit b1aaeee
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
16 changes: 12 additions & 4 deletions metadata-ingestion/src/datahub/cli/delete_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
3 changes: 3 additions & 0 deletions smoke-test/cypress-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion smoke-test/run-quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit b1aaeee

Please sign in to comment.