Dependency Update Workflow – p2d2 Project
Overview
This process describes the procedure for updating dependencies (e.g., AstroJS) in the p2d2 project with distributed teams and a multi-repo setup.
Roles
- Tech Lead (TL): Responsible for updates and coordination
- Team Members: Test updates in their feature branches
Workflow
Phase 1: Update by Tech Lead
Create Feature Branch
git checkout develop git pull hub develop git checkout -b feature/dependency-update-YYYY-MM-DDUpdate Dependencies
# Option A: Automatic (recommended for Astro) npx @astrojs/upgrade # Option B: Manual npm update # or specific: npm install astro@latestInstallation and Test
npm install rm -rf .astro/ node_modules/.astro node_modules/.vite DEBUG=astro:* npm run dev -- --host 0.0.0.0Commit and Merge
git add package.json package-lock.json git commit -m "chore: Update dependencies (Astro X.Y.Z)" git checkout develop git merge feature/dependency-update-YYYY-MM-DD git push all develop
Phase 2: Deployment to Dev Environment
Automatic Deployment
- CI/CD automatically deploys
developtodev.data-dna.eu
- CI/CD automatically deploys
Test on Dev Environment
- TL tests all main functions on dev.data-dna.eu
- In case of problems: Bugfix in
developor rollback
Phase 3: Team Testing
Team Notification
- TL informs teams via Issue/Mail/Chat:
Update available in develop: - Astro X.Y.Z - [other updates] Please pull, run npm install and test. Feedback by [Date] in Issue #XYZ
- TL informs teams via Issue/Mail/Chat:
Team Members Execute Locally
git checkout develop git pull hub develop npm install rm -rf .astro/ node_modules/.astro node_modules/.vite DEBUG=astro:* npm run dev -- --host 0.0.0.0Feedback Collection
- Teams report issues or give OK
- TL fixes critical issues in
develop
Phase 4: Production Release
Merge to Main
git checkout main git pull hub main git merge develop git push all mainDeployment to Production
- CI/CD automatically deploys to
www.data-dna.eu - TL performs smoke tests
- CI/CD automatically deploys to
Documentation
- Document update in CHANGELOG.md
- Create release notes (optional)
Important Notes
For Tech Lead
- ALWAYS commit package-lock.json (guarantees identical versions)
- Mark breaking changes in the commit message
- For major updates: extensive tests and documentation
git push allpushes to all remotes (hub, mirror, origin)
For Team Members
- After every pull with package.json changes: run
npm install - For build issues: clear cache (
.astro/,node_modules/.astro,node_modules/.vite) - Do not perform updates in feature branches (avoid merge conflicts)
Automation (Optional)
GitHub Action for automatic dependency checks:
yaml
name: Check Dependencies
on:
schedule:
- cron: '0 9 * * 1' # Mondays 9:00 AM
workflow_dispatch:
jobs:
check-updates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm outdated || true
- run: npx @astrojs/upgrade --checkTroubleshooting
"Module not found" errors after pull
rm -rf node_modules package-lock.json
npm installOutdated remote branches
git fetch --prune
git remote prune originCache issues
rm -rf .astro/ node_modules/.astro node_modules/.vite
npm run devNote: This text was translated automatically with AI assistance and has not yet been reviewed by a human.