feat(api): approvals + ECO workflows; refactor(storage): remove MinIO #154

Merged
forbes merged 2 commits from feat/approval-workflows into main 2026-02-19 20:57:17 +00:00
Owner

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-storage tool exists for any remaining MinIO deployments to migrate beforehand.

Deleted files:

  • internal/storage/storage.go — MinIO client implementation
  • cmd/migrate-storage/main.go — migration tool binary
  • scripts/migrate-storage.sh — remote migration script

Key changes (30 files, +104 / -849):

  • Simplify StorageConfig: remove Endpoint, AccessKey, SecretKey, Bucket, UseSSL, Region fields
  • Add SILO_STORAGE_ROOT_DIR env var override
  • Remove MinIO service, volumes, and env vars from all Docker Compose files
  • Change all SQL COALESCE defaults from minio to filesystem
  • Add migration 020 to update column defaults to filesystem
  • Remove minio-go/v7 dependency (go mod tidy)
  • Update all config examples, setup scripts, Makefile, docs, and tests
  • Zero MinIO references remain (verified via grep -ri minio)

Not modified (intentionally):

  • Historical migrations 001 and 017 (already applied to databases)
## 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-storage` tool exists for any remaining MinIO deployments to migrate beforehand. **Deleted files:** - `internal/storage/storage.go` — MinIO client implementation - `cmd/migrate-storage/main.go` — migration tool binary - `scripts/migrate-storage.sh` — remote migration script **Key changes (30 files, +104 / -849):** - Simplify `StorageConfig`: remove `Endpoint`, `AccessKey`, `SecretKey`, `Bucket`, `UseSSL`, `Region` fields - Add `SILO_STORAGE_ROOT_DIR` env var override - Remove MinIO service, volumes, and env vars from all Docker Compose files - Change all SQL `COALESCE` defaults from `minio` to `filesystem` - Add migration 020 to update column defaults to `filesystem` - Remove `minio-go/v7` dependency (`go mod tidy`) - Update all config examples, setup scripts, Makefile, docs, and tests - Zero MinIO references remain (verified via `grep -ri minio`) **Not modified (intentionally):** - Historical migrations 001 and 017 (already applied to databases)
forbes added 1 commit 2026-02-19 01:38:39 +00:00
- 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 #145
forbes added 1 commit 2026-02-19 20:36:42 +00:00
Remove the MinIO/S3 storage backend entirely. The filesystem backend is
fully implemented, already used in production, and a migrate-storage tool
exists for any remaining MinIO deployments to migrate beforehand.

Changes:
- Delete MinIO client implementation (internal/storage/storage.go)
- Delete migrate-storage tool (cmd/migrate-storage, scripts/migrate-storage.sh)
- Remove MinIO service, volumes, and env vars from all Docker Compose files
- Simplify StorageConfig: remove Endpoint, AccessKey, SecretKey, Bucket,
  UseSSL, Region fields; add SILO_STORAGE_ROOT_DIR env override
- Change all SQL COALESCE defaults from 'minio' to 'filesystem'
- Add migration 020 to update column defaults to 'filesystem'
- Remove minio-go/v7 dependency (go mod tidy)
- Update all config examples, setup scripts, docs, and tests
forbes changed title from feat(api): approvals + ECO workflow API with YAML-configurable workflows to feat(api): approvals + ECO workflows; refactor(storage): remove MinIO 2026-02-19 20:37:23 +00:00
forbes merged commit ed1ac45e12 into main 2026-02-19 20:57:17 +00:00
forbes deleted branch feat/approval-workflows 2026-02-19 20:57:18 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/silo#154