To pull the latest changes and ensure everything works:
./update.shThat's it! The script will:
- ✅ Check for uncommitted changes
- ✅ Pull latest from GitHub
- ✅ Update dependencies
- ✅ Run compatibility checks
- ✅ Run tests to ensure nothing broke
# Standard update (recommended)
./update.sh
# Skip tests (faster, but less safe)
./update.sh --skip-tests
# Force update even with uncommitted changes
./update.sh --force
# Show help
./update.sh --helpThe script is designed to work seamlessly even if you've already run git pull:
git pull origin main
./update.shIf you've already pulled changes, the script will:
- Detect that the repository is up-to-date
- Continue to check/update dependencies
- Continue to run compatibility checks and tests
This ensures your environment is always correct, regardless of how you got the code updates.
- Verifies you're in the git repository
- Checks for uncommitted changes
- Offers to stash changes if needed
- Fetches latest from GitHub
- Shows what will be updated
- Pulls changes safely
- Detects if
requirements.txtchanged - Auto-updates dependencies (if in virtual environment)
- Verifies critical dependencies are installed
- Verifies Python 3.11+ is installed
- Checks all critical dependencies:
atlassian-python-api(Confluence)beautifulsoup4(GCP docs reader)python-dotenv(Environment config)
- Runs all backend service tests
- Ensures new changes don't break existing functionality
- Can be skipped with
--skip-testsif needed
- Shows what was updated
- Displays recent commits
- Provides commands to review changes
# Pull latest changes and verify everything works
./update.sh# Faster, but less thorough
./update.sh --skip-tests# Script will offer to stash your changes
./update.sh
# Or force through (not recommended)
./update.sh --forceSolution: Either commit your changes or let the script stash them:
# Option 1: Commit your changes
git add .
git commit -m "Your changes"
./update.sh
# Option 2: Let script stash them
./update.sh
# (script will prompt to stash)
# Option 3: Force update (risky)
./update.sh --forceSolution: The script will auto-install if you're in a virtual environment. Otherwise:
pip install -r requirements.txtSolution: Review the test output and fix issues before proceeding:
# Run tests manually to see details
pytest backend/services/test_*.py -v
# Or skip tests temporarily (not recommended for production)
./update.sh --skip-testsSolution: Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate
./update.shIf you prefer to update manually:
# 1. Pull changes
git pull origin main
# 2. Update dependencies
pip install -r requirements.txt --upgrade
# 3. Run tests
pytest backend/services/test_*.py -v
# 4. Check what changed
git log --stat HEAD@{1}..HEAD- Run
./update.shregularly (daily or weekly) - Review the summary of changes after update
- Keep your virtual environment activated
- Commit your work before updating
- Using
--forcewithout understanding the risks - Skipping tests in production environments
- Updating without reviewing what changed
- Running updates without a virtual environment
For automated deployments, use the script in your CI/CD pipeline:
# Example GitHub Actions workflow
- name: Update and Test
run: |
./update.sh --skip-tests # Tests run separately in CIThe update script ensures compatibility with:
- Python: 3.11+
- Dependencies: Automatically updated from
requirements.txt - Services: All backend services tested after update
If you encounter issues:
- Check the error message - The script provides detailed error messages
- Review recent changes:
git log --stat HEAD@{1}..HEAD - Run tests manually:
pytest backend/services/test_*.py -v - Check dependencies:
pip list | grep -E "(atlassian|beautifulsoup4|dotenv)"
Created: 2025-11-18
Last Updated: 2025-11-18
Maintainer: Security Agent Team