feat(api): approvals + ECO workflows; refactor(storage): remove MinIO #154
Reference in New Issue
Block a user
Delete Branch "feat/approval-workflows"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes
1. Approvals + ECO Workflow API (YAML-configurable)
Adds a configurable approval and ECO (Engineering Change Order) workflow system driven by YAML definitions.
2. Remove MinIO Backend — Filesystem-Only Storage
Removes the MinIO/S3 storage backend entirely. The filesystem backend is fully implemented, already used in production, and a
migrate-storagetool exists for any remaining MinIO deployments to migrate beforehand.Deleted files:
internal/storage/storage.go— MinIO client implementationcmd/migrate-storage/main.go— migration tool binaryscripts/migrate-storage.sh— remote migration scriptKey changes (30 files, +104 / -849):
StorageConfig: removeEndpoint,AccessKey,SecretKey,Bucket,UseSSL,RegionfieldsSILO_STORAGE_ROOT_DIRenv var overrideCOALESCEdefaults fromminiotofilesystemfilesystemminio-go/v7dependency (go mod tidy)grep -ri minio)Not modified (intentionally):
- Add internal/workflow/ package for YAML workflow definitions (Load, LoadAll, Validate) - Add internal/db/item_approvals.go repository (Create, AddSignature, GetWithSignatures, ListByItemWithSignatures, UpdateState, UpdateSignature) - Add internal/api/approval_handlers.go with 4 endpoints: - GET /{partNumber}/approvals (list approvals with signatures) - POST /{partNumber}/approvals (create ECO with workflow + signers) - POST /{partNumber}/approvals/{id}/sign (approve or reject) - GET /workflows (list available workflow definitions) - Rule-driven state transitions: any_reject and all_required_approve - Pack approvals into silo/approvals.json on .kc checkout - Add WorkflowsConfig to config, load workflows at startup - Migration 019: add workflow_name column to item_approvals - Example workflows: engineering-change.yaml, quick-review.yaml - 7 workflow tests, all passing Closes #145feat(api): approvals + ECO workflow API with YAML-configurable workflowsto feat(api): approvals + ECO workflows; refactor(storage): remove MinIO