Fix(pipeline): optimize docker build, fix zip structure, and update UI
- Docker: - Explicitly install pixi environments (digger, pipeline, webbackend) during build to prevent runtime network/DNS failures. - Optimize pnpm config (copy method) to fix EAGAIN errors. - Backend: - Refactor ZIP bundling: use flat semantic directories (1_Toxin_Mining, etc.). - Fix "nested zip" issue by cleaning existing archives before bundling. - Exclude raw 'context' directory from final download. - Frontend: - Update TutorialView documentation to match new result structure. - Improve TaskMonitor progress bar precision (1 decimal place). - Update i18n (en/zh) for new file descriptions. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
26
AGENTS.md
26
AGENTS.md
@@ -499,3 +499,29 @@ docker exec bttoxin-pipeline curl http://127.0.0.1:8000/api/health
|
||||
4. **Health Check Path**:
|
||||
- **Cause**: Nginx routed `/health` to `/api/health` but backend expected `/health`.
|
||||
- **Fix**: Update Nginx config to proxy pass to correct endpoint.
|
||||
|
||||
### Post-Mortem: Consistency Refactoring & Fixes (2026-01-20 Update)
|
||||
|
||||
**Summary:**
|
||||
Major refactoring to ensure consistency between script execution and web pipeline, fix severe container startup failures, and simplify user experience.
|
||||
|
||||
**1. Unified Pipeline Execution**
|
||||
- **Problem**: Web backend manually orchestrated pipeline steps, leading to discrepancies with the standalone script (e.g., missing plots, different file formats).
|
||||
- **Fix**: Refactored `backend/app/workers/tasks.py` to directly subprocess `scripts/run_single_fna_pipeline.py`.
|
||||
- **Result**: Web output is now guaranteed identical to manual script execution.
|
||||
|
||||
**2. Result Format & Cleanup**
|
||||
- **Change**: Switched output format from `.tar.gz` to `.zip`.
|
||||
- **Feature**: Added automatic cleanup of intermediate directories (`digger/`, `shoter/`) to save disk space; only the final ZIP and logs are retained.
|
||||
- **Frontend**: Updated download logic to handle `.zip` files.
|
||||
|
||||
**3. Frontend Simplification**
|
||||
- **Change**: Removed CRISPR Fusion UI elements (beta feature) to reduce complexity.
|
||||
- **Change**: Replaced complex multi-stage status indicators with a "Simulated Progress Bar" for better UX during black-box script execution.
|
||||
- **Fix**: Restored "One-click load" button and fixed TypeScript build errors caused by removed variables.
|
||||
|
||||
**4. Critical Docker Fixes**
|
||||
- **Fix (Restart Loop)**: Removed incorrect `image: postgres` directive in `docker-compose.yml` that caused the web service to run database software instead of the app.
|
||||
- **Fix (Env Path)**: Updated `.dockerignore` to exclude host `.pixi` directory, preventing "bad interpreter" errors caused by hardcoded host paths in the container.
|
||||
- **Fix (404 Error)**: Removed erroneous `rm -rf /app/frontend` in Dockerfile that was accidentally deleting built frontend assets.
|
||||
- **Optimization**: Configured `npmmirror` registry to resolve build timeouts in CN network environments.
|
||||
|
||||
Reference in New Issue
Block a user