Skip to content

Commit b77b9f5

Browse files
fixes
1 parent ebf692b commit b77b9f5

File tree

2 files changed

+86
-1
lines changed

2 files changed

+86
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
],
127127
"postStartCommand": [
128128
"bash", "-c",
129-
"echo 'APIM Samples Codespace Starting - Keep this terminal open to see progress!' && bash .devcontainer/post-start-setup.sh"
129+
"echo 'APIM Samples Codespace Starting - Keep this terminal open to see progress!' && bash .devcontainer/post-start-setup-2.sh"
130130
],
131131
"forwardPorts": [
132132
8000,
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#!/bin/bash
2+
3+
# ------------------------------
4+
# APIM SAMPLES INSTANT VERIFICATION
5+
# ------------------------------
6+
7+
start=$(date +%s.%N)
8+
9+
# Make terminal output more prominent
10+
clear
11+
echo "============================================================================"
12+
echo " 🚀 APIM SAMPLES - INSTANT VERIFICATION "
13+
echo "============================================================================"
14+
echo ""
15+
echo "⚡ All heavy setup completed during prebuild - verifying environment..."
16+
echo ""
17+
18+
# ------------------------------
19+
# LIGHTNING FAST VERIFICATION
20+
# ------------------------------
21+
22+
WORKSPACE_ROOT="/workspaces/Apim-Samples"
23+
VENV_PATH="$WORKSPACE_ROOT/.venv"
24+
25+
echo "Environment Status:"
26+
27+
# Ultra-fast file system checks (no command execution)
28+
if [ -d "$VENV_PATH" ]; then
29+
echo " ✅ Virtual environment"
30+
else
31+
echo " ❌ Virtual environment missing"
32+
fi
33+
34+
if [ -f "$WORKSPACE_ROOT/.env" ]; then
35+
echo " ✅ Environment file"
36+
else
37+
echo " ❌ Environment file missing"
38+
fi
39+
40+
# Quick command availability checks (fast)
41+
if command -v az >/dev/null 2>&1; then
42+
echo " ✅ Azure CLI"
43+
else
44+
echo " ❌ Azure CLI missing"
45+
fi
46+
47+
if command -v python >/dev/null 2>&1; then
48+
echo " ✅ Python"
49+
else
50+
echo " ❌ Python missing"
51+
fi
52+
53+
# Quick Jupyter kernel check
54+
if jupyter kernelspec list 2>/dev/null | grep -q "apim-samples"; then
55+
echo " ✅ Jupyter kernel"
56+
else
57+
echo " ⚠️ Jupyter kernel missing (fallback registration...)"
58+
python -m ipykernel install --user --name=apim-samples --display-name="APIM Samples Python 3.12" >/dev/null 2>&1
59+
echo " ✅ Jupyter kernel registered"
60+
fi
61+
62+
# Calculate total duration
63+
end=$(date +%s.%N)
64+
duration=$(python3 -c "print(f'{float('$end') - float('$start'):.1f}')" 2>/dev/null || echo "0.1")
65+
66+
echo ""
67+
echo "============================================================================"
68+
echo " ⚡ INSTANT VERIFICATION COMPLETE! "
69+
echo "============================================================================"
70+
echo ""
71+
printf "⏱️ Verification time: %s seconds (prebuild optimizations working!)\n" "$duration"
72+
echo "🎉 Environment ready - all heavy lifting done during prebuild!"
73+
echo ""
74+
echo "🔍 This terminal shows your quick verification status."
75+
echo "📋 You can minimize this panel or open a new terminal for your work."
76+
echo ""
77+
echo "🚀 Your APIM Samples environment is ready to use!"
78+
echo ""
79+
echo " NEXT STEPS:"
80+
echo " -----------"
81+
echo ""
82+
echo " 1. Log in via the Azure CLI: az login"
83+
echo " 2. Start using the infrastructures and samples!"
84+
echo ""
85+
echo "============================================================================"

0 commit comments

Comments
 (0)