Commit Graph

5 Commits

Author SHA1 Message Date
Lucas Berger a1c0ce25cc feat(16-02): replace start/stop/restart with GraphQL mutations
- Add Build Start/Stop Mutation Code nodes to construct GraphQL queries
- Update Start/Stop Container HTTP nodes to POST to Unraid GraphQL API
- Add GraphQL Error Handler nodes after each mutation (maps ALREADY_IN_STATE to 304)
- Implement restart as sequential stop+start chain (no native restart mutation)
- Add Handle Stop-for-Restart Result node to tolerate 304 on stop step
- Wire: Route Action -> Build Mutation -> HTTP -> Error Handler -> Format Result
- Format Result nodes unchanged (zero-change migration for output formatting)
- Workflow pushed to n8n: HTTP 200
2026-02-09 10:23:37 -05:00
Lucas Berger abb98c0186 feat(16-02): replace container lookup with Unraid GraphQL API
- Replace 'Get All Containers' Docker API call with GraphQL query
- Add GraphQL Response Normalizer to transform Unraid format to Docker contract
- Add Container ID Registry update on every container lookup
- Update Resolve Container ID to output unraidId (PrefixedID) for mutations
- Wire: Query All Containers -> Normalizer -> Registry Update -> Resolve Container ID
2026-02-09 10:21:50 -05:00
Lucas Berger 1c632d039a feat(10.2-02): add structured error returns to all 7 sub-workflows
- Added correlationId field to all sub-workflow trigger schemas
- Added success: true/false fields to return paths
- Added error objects to failure paths with workflow, node, message, httpCode, rawResponse
- Implemented correlationId pass-through for error correlation
- Preserved backward compatibility (existing return fields unchanged)

Modified sub-workflows:
- n8n-actions.json: 3 Format Result nodes with full error objects
- n8n-update.json: Pull/Create/Start error paths with error objects
- n8n-logs.json: Added correlationId pass-through
- n8n-batch-ui.json: Added correlationId to trigger
- n8n-status.json: Added correlationId to trigger
- n8n-confirmation.json: Added correlationId pass-through to stop action
- n8n-matching.json: Added correlationId to trigger

All sub-workflows now return structured error objects on failures for main workflow error ring buffer capture.
2026-02-08 18:56:44 -05:00
Lucas Berger 0ba573a24d feat(10.1-08): add statusCode handling to container action result formatters
- Add HTTP 304 detection for 'already in desired state' (success: true)
- Add HTTP 404 detection for 'container not found' (success: false)
- Add HTTP 500+ detection for server errors (success: false)
- Apply to Format Stop/Start/Restart Result nodes
- StatusCode checks run before existing message-based fallback logic
2026-02-08 18:56:44 -05:00
Lucas Berger ff532aa99e refactor(10.1-01): rename sub-workflows to shorter pattern
- n8n-container-update.json -> n8n-update.json
- n8n-container-actions.json -> n8n-actions.json
- n8n-container-logs.json -> n8n-logs.json

Workflow IDs remain unchanged (n8n assigns on import).
Main workflow Execute Workflow nodes reference by ID, not filename.
2026-02-04 20:26:34 -05:00