From 6bd427f3f9c88aaf5feae3d4e1171c521cdea734 Mon Sep 17 00:00:00 2001 From: Joe Wu Date: Tue, 7 May 2024 15:36:01 -0700 Subject: [PATCH] Delete Smart agent package in B&R extract/upload script Summary: Smart agent was't release to production but we changed to tee-pl solution. thus this MPC solution is safe to delete and smart agent is never productionized and used in production code. Cleaning up the unused code in MPC B&R extract/upload script Reviewed By: wenhaizhu Differential Revision: D57076695 --- binaries_out_lists/smart_agent.txt | 1 - extract-docker-binaries.sh | 11 ++--------- promote_scripts/promote_binaries.sh | 1 - upload-binaries-to-s3-test.sh | 11 ++--------- upload_scripts/upload-binaries-using-onedocker.sh | 11 ++--------- 5 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 binaries_out_lists/smart_agent.txt diff --git a/binaries_out_lists/smart_agent.txt b/binaries_out_lists/smart_agent.txt deleted file mode 100644 index 9da72550c..000000000 --- a/binaries_out_lists/smart_agent.txt +++ /dev/null @@ -1 +0,0 @@ -smart_agent_server diff --git a/extract-docker-binaries.sh b/extract-docker-binaries.sh index 5ea10d3be..5a6dfab52 100755 --- a/extract-docker-binaries.sh +++ b/extract-docker-binaries.sh @@ -9,21 +9,20 @@ set -e PROG_NAME=$0 usage() { cat << EOF >&2 -Usage: $PROG_NAME [-t TAG] [-d DOCKER_IMAGE_NAME] +Usage: $PROG_NAME [-t TAG] [-d DOCKER_IMAGE_NAME] package: emp_games - extracts the binaries from fbpcs/emp-games docker image data_processing - extracts the binaries from fbpcs/data-processing docker image pid - extracts the binaries from private-id docker image validation - extracts the binaries from the onedocker docker image - smart_agent - extracts the binaries from the onedocker docker image -t TAG: uses the image with the given tag (default: latest) -d DOCKER_IMAGE_NAME: defines the image name to extract from EOF exit 1 } -PACKAGES="emp_games data_processing pid validation smart_agent" +PACKAGES="emp_games data_processing pid validation" PACKAGE=$1 if [[ ! " $PACKAGES " =~ $PACKAGE ]]; then usage @@ -53,7 +52,6 @@ if [ -z "$DOCKER_IMAGE_NAME" ]; then data_processing) DOCKER_IMAGE_NAME="fbpcs/data-processing";; pid) DOCKER_IMAGE_NAME="fbpcs/onedocker/test";; validation) DOCKER_IMAGE_NAME="fbpcs/onedocker/test";; - smart_agent) DOCKER_IMAGE_NAME="fbpcs/onedocker/test";; esac fi DOCKER_IMAGE_PATH="${DOCKER_IMAGE_NAME}:${TAG}" @@ -108,8 +106,3 @@ if [ "$PACKAGE" = "validation" ]; then docker create -ti --name "$TEMP_CONTAINER_NAME" "${DOCKER_IMAGE_PATH}" docker cp "$TEMP_CONTAINER_NAME":/usr/local/bin/pc_pre_validation_cli "$SCRIPT_DIR/binaries_out/." fi - -if [ "$PACKAGE" = "smart_agent" ]; then -docker create -ti --name "$TEMP_CONTAINER_NAME" "${DOCKER_IMAGE_PATH}" -docker cp "$TEMP_CONTAINER_NAME":/usr/local/bin/smart_agent_server "$SCRIPT_DIR/binaries_out/." -fi diff --git a/promote_scripts/promote_binaries.sh b/promote_scripts/promote_binaries.sh index ecdb5d172..0b0c34823 100755 --- a/promote_scripts/promote_binaries.sh +++ b/promote_scripts/promote_binaries.sh @@ -41,7 +41,6 @@ binary_names=( 'data_processing/attribution_id_combiner' 'data_processing/private_id_dfca_id_combiner' 'validation/pc_pre_validation_cli' - 'smart_agent/smart_agent_server' 'udp_encryptor' ) diff --git a/upload-binaries-to-s3-test.sh b/upload-binaries-to-s3-test.sh index 9d04a474a..6337423fa 100755 --- a/upload-binaries-to-s3-test.sh +++ b/upload-binaries-to-s3-test.sh @@ -9,20 +9,19 @@ set -e PROG_NAME=$0 usage() { cat << EOF >&2 -Usage: $PROG_NAME +Usage: $PROG_NAME package: emp_games - extracts the binaries from fbpcs/emp-games docker image data_processing - extracts the binaries from fbpcs/data-processing docker image pid - extracts the binaries from private-id docker image validation - extracts the binaries from the onedocker docker image - smart_agent - extracts the binaries from the onedocker docker image tag: used to determine the subfolder/version in s3 for each binary EOF exit 1 } -PACKAGES="emp_games data_processing pid validation smart_agent" +PACKAGES="emp_games data_processing pid validation" PACKAGE=$1 TAG=$2 if [[ ! " $PACKAGES " =~ $PACKAGE ]] || [[ ! " $TAG " =~ $TAG ]]; then @@ -45,7 +44,6 @@ private_id_dfca_aggregator_package="s3://$one_docker_repo/private_id_dfca/privat data_processing_repo="s3://$one_docker_repo/data_processing" private_id_repo="s3://$one_docker_repo/pid" validation_repo="s3://$one_docker_repo/validation" -smart_agent_repo="s3://$one_docker_repo/smart_agent" udp_encryptor_package="s3://$one_docker_repo/data_processing/unified_data_process/udp_encryptor/${TAG}/udp_encryptor" if [ "$PACKAGE" = "emp_games" ]; then @@ -88,8 +86,3 @@ if [ "$PACKAGE" = "validation" ]; then cd binaries_out || exit aws s3 cp pc_pre_validation_cli "$validation_repo/pc_pre_validation_cli/${TAG}/pc_pre_validation_cli" fi - -if [ "$PACKAGE" = "smart_agent" ]; then -cd binaries_out || exit -aws s3 cp smart_agent_server "$smart_agent_repo/smart_agent_server/${TAG}/smart_agent_server" -fi diff --git a/upload_scripts/upload-binaries-using-onedocker.sh b/upload_scripts/upload-binaries-using-onedocker.sh index 5914df435..33e632a74 100755 --- a/upload_scripts/upload-binaries-using-onedocker.sh +++ b/upload_scripts/upload-binaries-using-onedocker.sh @@ -9,14 +9,13 @@ set -e PROG_NAME=$0 usage() { cat << EOF >&2 -Usage: $PROG_NAME -c +Usage: $PROG_NAME -c package: emp_games - extracts the binaries from fbpcs/emp-games docker image data_processing - extracts the binaries from fbpcs/data-processing docker image pid - extracts the binaries from private-id docker image validation - extracts the binaries from the onedocker docker image - smart_agent - extracts the binaries from the onedocker docker image tag: used to determine the subfolder/version in s3 for each binary @@ -25,7 +24,7 @@ EOF exit 1 } -PACKAGES="emp_games data_processing pid validation smart_agent" +PACKAGES="emp_games data_processing pid validation" PACKAGE=$1 TAG=$2 @@ -107,9 +106,3 @@ cd binaries_out || exit onedocker_upload validation/pc_pre_validation_cli pc_pre_validation_cli cd .. || exit fi - -if [ "$PACKAGE" = "smart_agent" ]; then -cd binaries_out || exit -onedocker_upload smart_agent/smart_agent_server smart_agent_server -cd .. || exit -fi