115 lines
2.8 KiB
Markdown
115 lines
2.8 KiB
Markdown
# 🔍 Checking Enhanced Workflow Execution Results
|
||
|
||
## The Issue: Production vs Test Webhook Behavior
|
||
|
||
### Test Webhook (from n8n Editor):
|
||
- ✅ Shows real-time execution in the editor
|
||
- ✅ Waits for all nodes to complete before responding
|
||
- ✅ Shows final results immediately
|
||
|
||
### Production Webhook (URL: https://n8n.oky.sh/webhook/openhands-enhanced):
|
||
- ⚡ Returns immediately with "Workflow was started"
|
||
- ⚡ Executes in background (asynchronously)
|
||
- ⚡ Results available in n8n "Executions" tab
|
||
|
||
---
|
||
|
||
## How to Check Production Webhook Results:
|
||
|
||
### Method 1: View Executions in n8n UI (Recommended)
|
||
1. Go to: https://n8n.oky.sh
|
||
2. Click **"Executions"** (in top navigation)
|
||
3. Look for the latest execution with **"Gitea → OpenHands Enhanced CI/CD"**
|
||
4. Click on it to see:
|
||
- Each node's execution
|
||
- Input/output data
|
||
- Error messages
|
||
- Final response
|
||
|
||
### Method 2: Monitor Workflow in Real-Time
|
||
1. Open the workflow in n8n editor
|
||
2. Switch to **"Executions"** tab (bottom panel)
|
||
3. Trigger the webhook
|
||
4. Watch the execution flow in real-time
|
||
|
||
---
|
||
|
||
## Trigger Test Scenarios:
|
||
|
||
### Test 1: Manual cURL
|
||
```bash
|
||
curl -X POST https://n8n.oky.sh/webhook/openhands-enhanced \
|
||
-H "Content-Type: application/json" \
|
||
-d '{
|
||
"repository": {
|
||
"name": "mvp-factory-openhands",
|
||
"full_name": "gitadmin/mvp-factory-openhands"
|
||
},
|
||
"ref": "refs/heads/main",
|
||
"commits": [{"message": "Test"}]
|
||
}'
|
||
```
|
||
|
||
### Test 2: Git Push (Gitea Webhook)
|
||
```bash
|
||
echo "Test webhook" >> test.txt
|
||
git add .
|
||
git commit -m "Trigger enhanced workflow"
|
||
git push origin main
|
||
```
|
||
|
||
---
|
||
|
||
## Understanding the Response:
|
||
|
||
### Immediate Response (Production):
|
||
```json
|
||
{
|
||
"message": "Workflow was started"
|
||
}
|
||
```
|
||
This just means the webhook was received. The actual execution happens asynchronously.
|
||
|
||
### Final Response Format (from "Format Build Response" node):
|
||
```json
|
||
{
|
||
"status": "SUCCESS",
|
||
"emoji": "✅",
|
||
"repo": "gitadmin/mvp-factory-openhands",
|
||
"branch": "main",
|
||
"commit": "d332b44",
|
||
"message": "Build completed successfully",
|
||
"timestamp": "2025-12-01T18:11:00.000Z",
|
||
"retry_count": 0
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
## Troubleshooting:
|
||
|
||
### If execution doesn't start:
|
||
1. Check workflow is **ACTIVE** (toggle in top-right of editor)
|
||
2. Verify webhook URL is correct
|
||
3. Check n8n logs: `docker logs -f n8n`
|
||
|
||
### If execution fails:
|
||
1. Check each node's status in Executions tab
|
||
2. Look for error messages in red boxes
|
||
3. Common issues:
|
||
- SSH credentials invalid
|
||
- OpenHands wrapper script missing
|
||
- Repository not accessible
|
||
|
||
### If workflow hangs:
|
||
1. Check "Wait" nodes (10s initial, 15s between retries)
|
||
2. Total execution time: ~10s + (15s × retry attempts)
|
||
3. SSH timeout settings
|
||
|
||
---
|
||
|
||
## Current Status:
|
||
- ✅ Production webhook URL: ACTIVE
|
||
- ✅ Last triggered: Just now (commit d332b44)
|
||
- ✅ Check results: https://n8n.oky.sh/executions
|