Skip to content

Commit

Permalink
Delete Smart agent package in B&R extract/upload script (#2400)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
joe1234wu authored and facebook-github-bot committed May 7, 2024
1 parent ff6b148 commit 000dd4f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 29 deletions.
1 change: 0 additions & 1 deletion binaries_out_lists/smart_agent.txt

This file was deleted.

11 changes: 2 additions & 9 deletions extract-docker-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ set -e
PROG_NAME=$0
usage() {
cat << EOF >&2
Usage: $PROG_NAME <emp_games|data_processing|pid|validation|smart_agent> [-t TAG] [-d DOCKER_IMAGE_NAME]
Usage: $PROG_NAME <emp_games|data_processing|pid|validation> [-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
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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
1 change: 0 additions & 1 deletion promote_scripts/promote_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)

Expand Down
11 changes: 2 additions & 9 deletions upload-binaries-to-s3-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ set -e
PROG_NAME=$0
usage() {
cat << EOF >&2
Usage: $PROG_NAME <emp_games|data_processing|pid|validation|smart_agent> <tag>
Usage: $PROG_NAME <emp_games|data_processing|pid|validation> <tag>
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
Expand All @@ -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
Expand Down Expand Up @@ -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
11 changes: 2 additions & 9 deletions upload_scripts/upload-binaries-using-onedocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ set -e
PROG_NAME=$0
usage() {
cat << EOF >&2
Usage: $PROG_NAME <emp_games|data_processing|pid|validation|smart_agent> <tag> -c <config>
Usage: $PROG_NAME <emp_games|data_processing|pid|validation> <tag> -c <config>
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
Expand All @@ -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

Expand Down Expand Up @@ -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

0 comments on commit 000dd4f

Please sign in to comment.