Skip to content

Commit e305668

Browse files
Revert "chore: Generate build artifacts for 2.8.3 release"
This reverts commit 23027d6.
1 parent f242d7f commit e305668

File tree

3 files changed

+48
-20
lines changed

3 files changed

+48
-20
lines changed

build_artifacts/v2/v2.8/v2.8.3/dirs/etc/sagemaker-ui/network_validation.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,18 @@ temp_dir=$(mktemp -d)
126126
# Launch all service API checks in parallel background jobs
127127
for service in "${!SERVICE_COMMANDS[@]}"; do
128128
{
129-
# Run command with timeout, discard stdout/stderr
130-
if timeout "${api_time_out_limit}s" bash -c "${SERVICE_COMMANDS[$service]}" > /dev/null 2>&1; then
129+
output_file="$temp_dir/${service}_output"
130+
131+
# Run command with timeout
132+
if timeout "${api_time_out_limit}s" bash -c "${SERVICE_COMMANDS[$service]}" > "$output_file" 2>&1; then
131133
# Success: write OK to temp file
132134
echo "OK" > "$temp_dir/$service"
133135
else
134136
# Get exit code to differentiate timeout or other errors
135137
exit_code=$?
136-
if [ "$exit_code" -eq 124 ]; then
138+
if grep -q "Could not connect to the endpoint URL" "$output_file"; then
139+
echo "UNREACHABLE" > "$temp_dir/$service"
140+
elif [ "$exit_code" -eq 124 ]; then
137141
# Timeout exit code
138142
echo "TIMEOUT" > "$temp_dir/$service"
139143
else
@@ -155,10 +159,13 @@ for service in "${!SERVICE_COMMANDS[@]}"; do
155159
if [[ "$result" == "TIMEOUT" ]]; then
156160
echo "$service API did NOT resolve within ${api_time_out_limit}s. Marking as unreachable."
157161
unreachable_services+=("$service")
162+
elif [[ "$result" == "UNREACHABLE" ]]; then
163+
echo "$service API failed to connect to the endpoint. Marking as unreachable."
164+
unreachable_services+=("$service")
158165
elif [[ "$result" == "OK" ]]; then
159166
echo "$service API is reachable."
160167
else
161-
echo "$service API returned an error (but not a timeout). Ignored for network check."
168+
echo "$service API returned an error (but not a timeout or endpoint reachability failure). Ignored for network check."
162169
fi
163170
else
164171
echo "$service check did not produce a result file. Skipping."

build_artifacts/v2/v2.8/v2.8.3/dirs/etc/sagemaker-ui/sagemaker_ui_post_startup.sh

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,43 @@ c.Application.logging_config = {
8787
EOT
8888
fi
8989

90-
# Setting this to +x to not log credentials from the response of fetching credentials.
91-
set +x
90+
# Add debug call to get domain info
91+
if [ ! -z "$dataZoneEndPoint" ]; then
92+
domain_response=$(aws datazone get-domain --debug --endpoint-url "$dataZoneEndPoint" --identifier "$dataZoneDomainId" --region "$dataZoneDomainRegion" 2>&1)
9293

93-
# Note: The $? check immediately follows the sagemaker-studio command to ensure we're checking its exit status.
94-
# Adding commands between these lines could lead to incorrect error handling.
95-
response=$(timeout 30 sagemaker-studio credentials get-domain-execution-role-credential-in-space --domain-id "$dataZoneDomainId" --profile default)
96-
responseStatus=$?
94+
else
95+
domain_response=$(aws datazone get-domain --debug --identifier "$dataZoneDomainId" --region "$dataZoneDomainRegion" 2>&1)
96+
fi
97+
98+
# Check if domain is in express mode
99+
response_body=$(echo "$domain_response" | grep -A1 "Response body:" | tail -n1 | sed 's/^b'\''//;s/'\''$//')
100+
# Remove leading/trailing whitespace and the 'b' prefix
101+
cleaned_response=$(echo "$response_body" | sed 's/\\n//g')
102+
is_express_mode=$(echo "$cleaned_response" | jq -r '.preferences.DOMAIN_MODE == "EXPRESS"')
103+
104+
if [ "$is_express_mode" = "true" ]; then
105+
echo "Domain is in express mode. Using default credentials"
106+
# Use default credentials - no additional configuration needed
107+
aws configure set credential_source EcsContainer --profile DomainExecutionRoleCreds
108+
echo "Successfully configured DomainExecutionRoleCreds profile with default credentials"
109+
else
110+
echo "Domain is not in express mode"
111+
# Setting this to +x to not log credentials from the response of fetching credentials.
112+
set +x
113+
# Note: The $? check immediately follows the sagemaker-studio command to ensure we're checking its exit status.
114+
# Adding commands between these lines could lead to incorrect error handling.
115+
response=$(timeout 30 sagemaker-studio credentials get-domain-execution-role-credential-in-space --domain-id "$dataZoneDomainId" --profile default)
116+
responseStatus=$?
97117

98-
set -x
118+
set -x
99119

100-
if [ $responseStatus -ne 0 ]; then
120+
if [ $responseStatus -ne 0 ]; then
101121
echo "Failed to fetch domain execution role credentials. Will skip adding new credentials profile: DomainExecutionRoleCreds."
102122
write_status_to_file "error" "Network issue detected. Your domain may be using a public subnet, which affects IDE functionality. Please contact your admin."
103-
else
123+
else
104124
aws configure set credential_process "sagemaker-studio credentials get-domain-execution-role-credential-in-space --domain-id $dataZoneDomainId --profile default" --profile DomainExecutionRoleCreds
105125
echo "Successfully configured DomainExecutionRoleCreds profile"
126+
fi
106127
fi
107128

108129
# Run AWS CLI command to get the username from DataZone User Profile.
@@ -179,7 +200,7 @@ mkdir -p "$HOME/.config" # Create config directory if it doesn't exist
179200
jq -n \
180201
--arg smusProjectDirectory "$SMUS_PROJECT_DIR" \
181202
--arg isGitProject "$IS_GIT_PROJECT" \
182-
'{
203+
'{
183204
smusProjectDirectory: $smusProjectDirectory,
184205
isGitProject: ($isGitProject == "true")
185206
}' > "$HOME/.config/smus-storage-metadata.json"
@@ -210,8 +231,8 @@ fi
210231

211232
# Generate sagemaker pysdk intelligent default config
212233
nohup python /etc/sagemaker/sm_pysdk_default_config.py &
213-
# Only run the following commands if SAGEMAKER_APP_TYPE_LOWERCASE is jupyterlab
214-
if [ "${SAGEMAKER_APP_TYPE_LOWERCASE}" = "jupyterlab" ]; then
234+
# Only run the following commands if SAGEMAKER_APP_TYPE_LOWERCASE is jupyterlab and domain is not in express mode
235+
if [ "${SAGEMAKER_APP_TYPE_LOWERCASE}" = "jupyterlab" ] && [ "$is_express_mode" != "true" ]; then
215236
# do not fail immediately for non-zero exit code returned
216237
# by start-workflows-container. An expected non-zero exit
217238
# code will be returned if there is not a minimum of 2
@@ -224,7 +245,7 @@ if [ "${SAGEMAKER_APP_TYPE_LOWERCASE}" = "jupyterlab" ]; then
224245

225246
# write unexpected error to file if any of the remaining scripts fail.
226247
trap 'write_status_to_file "error" "An unexpected error occurred. Please stop and restart your space to retry."' ERR
227-
248+
228249
# Install conda and pip dependencies if lib mgmt config existing
229250
bash /etc/sagemaker-ui/libmgmt/install-lib.sh
230251

build_artifacts/v2/v2.8/v2.8.3/gpu.env.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ https://conda.anaconda.org/conda-forge/linux-64/cuda-cupti-12.6.80-hbd13f7d_0.co
6767
https://conda.anaconda.org/conda-forge/linux-64/cuda-nvrtc-12.6.85-hbd13f7d_0.conda#9d9909844a0133153d54b6f07283da8c
6868
https://conda.anaconda.org/conda-forge/linux-64/cuda-nvtx-12.6.77-hbd13f7d_0.conda#3fe3afe309918465f82f984b3a1a85e9
6969
https://conda.anaconda.org/conda-forge/linux-64/libcublas-12.6.4.1-h5888daf_1.conda#7718c5dd31ed259736a30b8a1422de70
70-
https://conda.anaconda.org/conda-forge/linux-64/libcudnn-9.10.1.4-hf7e9902_1.conda#5a7a6c122c6c0fd02ba79acdbc1db835
71-
https://conda.anaconda.org/conda-forge/linux-64/libcudnn-dev-9.10.1.4-h58dd1b1_1.conda#b6ca81583e20611b7f748de30b8d2deb
72-
https://conda.anaconda.org/conda-forge/linux-64/cudnn-9.10.1.4-hbcb9cd8_1.conda#196d27419be0b3c06a5dd0ae15bdc141
70+
https://conda.anaconda.org/conda-forge/linux-64/libcudnn-9.10.1.4-h4840ae0_0.conda#c19f7281266ca77da5458d2ccf17ba82
71+
https://conda.anaconda.org/conda-forge/linux-64/libcudnn-dev-9.10.1.4-hcd2ec93_0.conda#bce8ec010b35f2c1e5db441f3f396754
72+
https://conda.anaconda.org/conda-forge/linux-64/cudnn-9.10.1.4-h7646684_0.conda#5aa5b04b995ebe10fe44de6fe93b1850
7373
https://conda.anaconda.org/conda-forge/linux-64/markupsafe-3.0.2-py311h2dc5d0c_1.conda#6565a715337ae279e351d0abd8ffe88a
7474
https://conda.anaconda.org/conda-forge/noarch/jinja2-3.1.6-pyhd8ed1ab_0.conda#446bd6c8cb26050d528881df495ce646
7575
https://conda.anaconda.org/conda-forge/linux-64/libabseil-20240722.0-cxx17_hbbce691_4.conda#488f260ccda0afaf08acb286db439c2f

0 commit comments

Comments
 (0)