Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-1910 Remove unused variables and expansions from serverless/create-instance.sh #479

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions .evergreen/serverless/create-instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ for VARNAME in ${VARLIST[*]}; do
[[ -z "${!VARNAME:-}" ]] && echo "ERROR: $VARNAME not set" && exit 1;
done

# Historically, this script accepted LOADBALANCED=ON to opt in to testing load
# balanced serverless instances. Since all serverless instances now use a load
# balancer, prohibit opting out (i.e. defining LOADBALANCED != ON).
if [ -n "${LOADBALANCED:-}" -a "${LOADBALANCED:-}" != "ON" ]; then
echo "Cannot opt out of testing load balanced serverless instances"
exit 1
fi

# Generate a random instance name if one was not provided.
# See: https://docs.atlas.mongodb.com/reference/atlas-limits/#label-limits
if [ -z "${SERVERLESS_INSTANCE_NAME:-}" ]; then
Expand Down Expand Up @@ -118,20 +110,7 @@ RESP=$(curl -sS \
SERVERLESS_MONGODB_VERSION=$($PYTHON -c "import json;d=json.loads('${RESP}');print(d['mongoDBVersion'])")
echo "SERVERLESS_MONGODB_VERSION=$SERVERLESS_MONGODB_VERSION"

cat << EOF >> $CURRENT_DIR/serverless-expansion.yml
SERVERLESS_URI: "$SERVERLESS_URI"

# Define original variables for backwards compatibility
MONGODB_URI: "$SERVERLESS_URI"
MONGODB_SRV_URI: "$SERVERLESS_URI"
SSL: "ssl"
AUTH: "auth"
TOPOLOGY: "sharded_cluster"
SERVERLESS: "serverless"
SINGLE_ATLASPROXY_SERVERLESS_URI: "$SERVERLESS_URI"
MULTI_ATLASPROXY_SERVERLESS_URI: "$SERVERLESS_URI"
SERVERLESS_MONGODB_VERSION: "$SERVERLESS_MONGODB_VERSION"
EOF
echo "SERVERLESS_URI: \"$SERVERLESS_URI\"" >> $CURRENT_DIR/serverless-expansion.yml

# Add the uri to the secrets file.
if [ -f "./secrets-export.sh" ]; then
Expand Down
Loading