Skip to content

Rename main.yml to stress_test.yml #1

Rename main.yml to stress_test.yml

Rename main.yml to stress_test.yml #1

Workflow file for this run

# .github/workflows/ultimate_stress_test.yml
name: 🔥 Ultimate Omnipkg Stress Test - Multi-Version Scientific Package Chaos
on:
workflow_dispatch:
push:
branches: ['main', 'dev', 'test-stress']
schedule:
- cron: '0 6 * * 1' # Weekly Monday 6AM UTC
jobs:
omnipkg-ultimate-stress:
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 45
steps:
- name: 🏁 Checkout Repository
uses: actions/checkout@v4
- name: 🐍 Set up Python 3.11 (Base Environment)
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: 🔧 Install Redis & System Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y redis-server build-essential python3-dev
sudo systemctl start redis-server
redis-cli ping
echo "✅ Redis is running"
- name: 📦 Install omnipkg
run: |
python -m pip install --upgrade pip
pip install -e .
echo "🚀 omnipkg $(omnipkg --version) installed"
- name: ⚙️ Configure omnipkg for Non-Interactive Stress Testing
run: |
python - << 'EOF'
import sys
import site
import json
from pathlib import Path
import os
site_packages_path = site.getsitepackages()[0]
python_executable_path = sys.executable
project_root = Path(os.environ['GITHUB_WORKSPACE'])
config_data = {
'site_packages_path': site_packages_path,
'multiversion_base': str(Path(site_packages_path) / '.omnipkg_versions'),
'python_executable': python_executable_path,
'builder_script_path': str(project_root / 'omnipkg' / 'package_meta_builder.py'),
'redis_host': 'localhost',
'redis_port': 6379,
'redis_key_prefix': 'omnipkg:pkg:',
'paths_to_index': [str(Path(python_executable_path).parent), '/usr/local/bin', '/usr/bin', '/bin'],
'auto_cleanup': True,
'cleanup_threshold_days': 30,
'non_interactive': True,
'auto_resolve_conflicts': True
}
config_dir = Path.home() / '.config' / 'omnipkg'
config_dir.mkdir(parents=True, exist_ok=True)
config_path = config_dir / 'config.json'
with open(config_path, 'w') as f:
json.dump(config_data, f, indent=2)
print(f'✅ omnipkg configured for stress testing at {config_path}')
EOF
- name: 🚀 Ready to Stress Test
run: |
echo "🚀 omnipkg is ready - knowledge base will auto-build as needed"
echo "✅ Starting stress test with intelligent package manager"
- name: 🎪 Phase 1 - Built-in Stress Test Demo
id: builtin_stress
run: |
echo "=== PHASE 1: Running omnipkg's built-in stress-test ===" | tee stress_test_phase1.log
echo "This will demonstrate heavy scientific packages with conflict resolution..." | tee -a stress_test_phase1.log
# Run the built-in stress test
timeout 900 omnipkg stress-test --yes 2>&1 | tee -a stress_test_phase1.log || true
echo "📊 Phase 1 Complete - Built-in stress test finished" | tee -a stress_test_phase1.log
echo "Current environment status:" | tee -a stress_test_phase1.log
omnipkg status --quiet | tee -a stress_test_phase1.log
- name: 💥 Phase 2 - Multi-Version Package Chaos
id: multi_version_chaos
run: |
echo "=== PHASE 2: Multi-Version Package Installation Chaos ===" | tee stress_test_phase2.log
echo "Testing omnipkg's version bubbling and conflict resolution..." | tee -a stress_test_phase2.log
# Install conflicting versions of popular packages
echo "🔥 Installing multiple versions of numpy..." | tee -a stress_test_phase2.log
omnipkg install numpy==1.21.0 --yes | tee -a stress_test_phase2.log
omnipkg install numpy==1.22.0 --yes | tee -a stress_test_phase2.log
omnipkg install numpy==1.23.0 --yes | tee -a stress_test_phase2.log
echo "🔥 Installing multiple versions of requests..." | tee -a stress_test_phase2.log
omnipkg install requests==2.25.0 --yes | tee -a stress_test_phase2.log
omnipkg install requests==2.28.0 --yes | tee -a stress_test_phase2.log
echo "🔥 Installing multiple versions of pandas..." | tee -a stress_test_phase2.log
omnipkg install pandas==1.3.0 --yes | tee -a stress_test_phase2.log
omnipkg install pandas==2.0.0 --yes | tee -a stress_test_phase2.log
echo "🔥 Installing conflicting Django versions..." | tee -a stress_test_phase2.log
omnipkg install django==3.2 --yes | tee -a stress_test_phase2.log
omnipkg install django==4.2 --yes | tee -a stress_test_phase2.log
echo "📊 Multi-version installation complete!" | tee -a stress_test_phase2.log
omnipkg list | tee -a stress_test_phase2.log
- name: 🧪 Phase 3 - Scientific Computing Package Mayhem
id: scientific_mayhem
run: |
echo "=== PHASE 3: Scientific Computing Package Installation Mayhem ===" | tee stress_test_phase3.log
echo "Testing complex dependency resolution with heavy scientific packages..." | tee -a stress_test_phase3.log
# Install scientific packages that often conflict
echo "🧬 Installing scipy with specific numpy requirements..." | tee -a stress_test_phase3.log
omnipkg install scipy --yes | tee -a stress_test_phase3.log
echo "📊 Installing matplotlib..." | tee -a stress_test_phase3.log
omnipkg install matplotlib --yes | tee -a stress_test_phase3.log
echo "🤖 Installing scikit-learn..." | tee -a stress_test_phase3.log
omnipkg install scikit-learn --yes | tee -a stress_test_phase3.log
echo "🔬 Installing jupyter notebook..." | tee -a stress_test_phase3.log
omnipkg install jupyter --yes | tee -a stress_test_phase3.log
echo "⚡ Installing numba..." | tee -a stress_test_phase3.log
omnipkg install numba --yes | tee -a stress_test_phase3.log
echo "📊 Scientific package mayhem complete!" | tee -a stress_test_phase3.log
omnipkg status | tee -a stress_test_phase3.log
- name: 🎯 Phase 4 - Complex Version Specification Stress
id: complex_version_stress
run: |
echo "=== PHASE 4: Complex Version Specification Stress Test ===" | tee stress_test_phase4.log
echo "Testing omnipkg's ability to handle complex version constraints..." | tee -a stress_test_phase4.log
# Test complex version specifications
echo "🎯 Installing with complex constraints..." | tee -a stress_test_phase4.log
omnipkg install 'flask>=2.0,<3.0' --yes | tee -a stress_test_phase4.log
omnipkg install 'click>=7.0,!=7.1.0,<9.0' --yes | tee -a stress_test_phase4.log
omnipkg install 'jinja2>=3.0.0,<4.0.0' --yes | tee -a stress_test_phase4.log
echo "🔄 Installing packages that will force version bubbling..." | tee -a stress_test_phase4.log
omnipkg install werkzeug==2.1.0 --yes | tee -a stress_test_phase4.log
omnipkg install werkzeug==2.3.0 --yes | tee -a stress_test_phase4.log
echo "📊 Complex version specification stress complete!" | tee -a stress_test_phase4.log
omnipkg list | tee -a stress_test_phase4.log
- name: 🚀 Phase 5 - Sabotage Environment with pip/uv, Then omnipkg Rescue
id: sabotage_and_rescue
run: |
echo "=== PHASE 5: Environment Sabotage & omnipkg Rescue ===" | tee stress_test_phase5.log
echo "Testing omnipkg's ability to recover from OTHER tools' failures..." | tee -a stress_test_phase5.log
echo "📸 Current pristine omnipkg environment (before sabotage):" | tee -a stress_test_phase5.log
omnipkg status | tee -a stress_test_phase5.log
echo "💥 SABOTAGING environment with pip force installs..." | tee -a stress_test_phase5.log
echo "Installing conflicting versions with pip --force-reinstall to break dependencies..." | tee -a stress_test_phase5.log
# Use pip to force install conflicting versions and break the environment
pip install --force-reinstall numpy==1.19.5 2>&1 | tee -a stress_test_phase5.log || true
pip install --force-reinstall requests==2.20.0 2>&1 | tee -a stress_test_phase5.log || true
pip install --force-reinstall urllib3==1.25.0 2>&1 | tee -a stress_test_phase5.log || true
echo "💀 Environment after pip sabotage:" | tee -a stress_test_phase5.log
python -c "import numpy; print(f'numpy version: {numpy.__version__}')" 2>&1 | tee -a stress_test_phase5.log || echo "numpy import BROKEN" | tee -a stress_test_phase5.log
python -c "import requests; print(f'requests version: {requests.__version__}')" 2>&1 | tee -a stress_test_phase5.log || echo "requests import BROKEN" | tee -a stress_test_phase5.log
omnipkg status 2>&1 | tee -a stress_test_phase5.log || echo "omnipkg detected environment damage" | tee -a stress_test_phase5.log
echo "🚑 OMNIPKG RESCUE OPERATION - Running revert..." | tee -a stress_test_phase5.log
omnipkg revert --yes 2>&1 | tee -a stress_test_phase5.log
echo "✅ Environment after omnipkg rescue:" | tee -a stress_test_phase5.log
omnipkg status | tee -a stress_test_phase5.log
python -c "import numpy; print(f'numpy version after rescue: {numpy.__version__}')" 2>&1 | tee -a stress_test_phase5.log || echo "numpy still broken" | tee -a stress_test_phase5.log
python -c "import requests; print(f'requests version after rescue: {requests.__version__}')" 2>&1 | tee -a stress_test_phase5.log || echo "requests still broken" | tee -a stress_test_phase5.log
- name: 📊 Final Environment Analysis
if: always()
run: |
echo "=== FINAL STRESS TEST ANALYSIS ===" | tee final_analysis.log
echo "Timestamp: $(date)" | tee -a final_analysis.log
echo "" | tee -a final_analysis.log
echo "🔍 Final omnipkg status:" | tee -a final_analysis.log
omnipkg status | tee -a final_analysis.log
echo "" | tee -a final_analysis.log
echo "📦 All installed packages:" | tee -a final_analysis.log
omnipkg list | tee -a final_analysis.log
echo "" | tee -a final_analysis.log
echo "🧠 Redis knowledge base stats:" | tee -a final_analysis.log
redis-cli info keyspace | tee -a final_analysis.log
redis-cli keys "omnipkg:*" | wc -l | xargs echo "Total omnipkg Redis keys:" | tee -a final_analysis.log
echo "" | tee -a final_analysis.log
echo "💾 System resource usage:" | tee -a final_analysis.log
df -h | tee -a final_analysis.log
free -h | tee -a final_analysis.log
- name: 📈 Generate Comprehensive Stress Test Report
if: always()
run: |
REPORT_FILE="omnipkg_ultimate_stress_test_report.md"
echo "# 🔥 Omnipkg Ultimate Stress Test Report" > $REPORT_FILE
echo "" >> $REPORT_FILE
echo "**Workflow Run:** [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $REPORT_FILE
echo "**Test Date:** $(date)" >> $REPORT_FILE
echo "**Overall Status:** \`${{ job.status }}\`" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "## 🎯 Stress Test Phases" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "### Phase 1: Built-in Stress Test" >> $REPORT_FILE
echo "**Status:** \`${{ steps.builtin_stress.outcome }}\`" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
head -50 stress_test_phase1.log 2>/dev/null || echo "Phase 1 log not available" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "### Phase 2: Multi-Version Package Chaos" >> $REPORT_FILE
echo "**Status:** \`${{ steps.multi_version_chaos.outcome }}\`" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
tail -30 stress_test_phase2.log 2>/dev/null || echo "Phase 2 log not available" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "### Phase 3: Scientific Computing Mayhem" >> $REPORT_FILE
echo "**Status:** \`${{ steps.scientific_mayhem.outcome }}\`" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
tail -30 stress_test_phase3.log 2>/dev/null || echo "Phase 3 log not available" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "### Phase 4: Complex Version Specification Stress" >> $REPORT_FILE
echo "**Status:** \`${{ steps.complex_version_stress.outcome }}\`" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
tail -20 stress_test_phase4.log 2>/dev/null || echo "Phase 4 log not available" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "### Phase 5: Environment Sabotage & omnipkg Rescue" >> $REPORT_FILE
echo "**Status:** \`${{ steps.sabotage_and_rescue.outcome }}\`" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "**Key Point:** omnipkg never breaks environments, so revert only works when OTHER tools mess things up!" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
tail -30 stress_test_phase5.log 2>/dev/null || echo "Phase 5 log not available" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "## 📊 Final Environment Analysis" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
cat final_analysis.log 2>/dev/null || echo "Final analysis not available" >> $REPORT_FILE
echo "\`\`\`" >> $REPORT_FILE
echo "" >> $REPORT_FILE
if [ "${{ job.status }}" == "success" ]; then
echo "## ✅ Stress Test Conclusion" >> $REPORT_FILE
echo "**🎉 OMNIPKG SURVIVED THE ULTIMATE STRESS TEST!**" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "omnipkg successfully handled:" >> $REPORT_FILE
echo "- ✅ Heavy scientific package installations" >> $REPORT_FILE
echo "- ✅ Multi-version package coexistence with automatic bubbling" >> $REPORT_FILE
echo "- ✅ Complex version constraint resolution" >> $REPORT_FILE
echo "- ✅ Dependency conflict resolution" >> $REPORT_FILE
echo "- ✅ Survived pip sabotage attempts and successfully rescued the environment" >> $REPORT_FILE
echo "- ✅ Environment recovery and revert capabilities (when OTHER tools break things)" >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "**🎯 KEY INSIGHT: omnipkg's intelligence means it NEVER breaks environments in the first place!**" >> $REPORT_FILE
echo "The revert feature only has work to do when inferior tools like pip mess things up." >> $REPORT_FILE
echo "" >> $REPORT_FILE
echo "This demonstrates omnipkg's superior intelligence and robustness compared to traditional package managers." >> $REPORT_FILE
else
echo "## ❌ Stress Test Issues" >> $REPORT_FILE
echo "The stress test encountered issues. Review the phase logs above for details." >> $REPORT_FILE
fi
- name: 📤 Upload All Stress Test Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: omnipkg-ultimate-stress-test-results
path: |
stress_test_phase*.log
final_analysis.log
omnipkg_ultimate_stress_test_report.md
pre_revert_state.txt
retention-days: 30
- name: 🚨 Failure Notification
if: failure()
run: |
echo "🚨 STRESS TEST FAILED - omnipkg encountered issues during the ultimate stress test"
echo "Check the uploaded artifacts for detailed logs and analysis"