|
Some checks failed
Veza CI / Backend (Go) (push) Failing after 0s
Veza CI / Frontend (Web) (push) Failing after 0s
Veza CI / Rust (Stream Server) (push) Failing after 0s
Security Scan / Secret Scanning (gitleaks) (push) Failing after 0s
Veza CI / Notify on failure (push) Failing after 0s
Phase 0 of the MinIO upload migration (FUNCTIONAL_AUDIT §4 item 2).
Schema + config only — Phase 1 will wire TrackService.UploadTrack()
to actually route writes to S3 when the flag is flipped.
Schema (migration 985):
- tracks.storage_backend VARCHAR(16) NOT NULL DEFAULT 'local'
CHECK in ('local', 's3')
- tracks.storage_key VARCHAR(512) NULL (S3 object key when backend=s3)
- Partial index on storage_backend = 's3' (migration progress queries)
- Rollback drops both columns + index; safe only while all rows are
still 'local' (guard query in the rollback comment)
Go model (internal/models/track.go):
- StorageBackend string (default 'local', not null)
- StorageKey *string (nullable)
- Both tagged json:"-" — internal plumbing, never exposed publicly
Config (internal/config/config.go):
- New field Config.TrackStorageBackend
- Read from TRACK_STORAGE_BACKEND env var (default 'local')
- Production validation rule #11 (ValidateForEnvironment):
- Must be 'local' or 's3' (reject typos like 'S3' or 'minio')
- If 's3', requires AWS_S3_ENABLED=true (fail fast, do not boot with
TrackStorageBackend=s3 while S3StorageService is nil)
- Dev/staging warns and falls back to 'local' instead of fail — keeps
iteration fast while still flagging misconfig.
Docs:
- docs/ENV_VARIABLES.md §13 restructured as "HLS + track storage backend"
with a migration playbook (local → s3 → migrate-storage CLI)
- docs/ENV_VARIABLES.md §28 validation rules: +2 entries for new rules
- docs/ENV_VARIABLES.md §29 drift findings: TRACK_STORAGE_BACKEND added
to "missing from template" list before it was fixed
- veza-backend-api/.env.template: TRACK_STORAGE_BACKEND=local with
comment pointing at Phase 1/2/3 plans
No behavior change yet — TrackService.UploadTrack() still hardcodes the
local path via copyFileAsync(). Phase 1 wires it.
Refs:
- AUDIT_REPORT.md §9 item (deferrals v1.0.8)
- FUNCTIONAL_AUDIT.md §4 item 2 "Stockage local disque only"
- /home/senke/.claude/plans/audit-fonctionnel-wild-hickey.md Item 3
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| admin.go | ||
| announcement.go | ||
| api_key.go | ||
| bitrate_adaptation.go | ||
| bitrate_adaptation_test.go | ||
| chat_message.go | ||
| cloud_file_share.go | ||
| cloud_file_version.go | ||
| co_listening_session.go | ||
| custom_claims.go | ||
| daily_track_stats.go | ||
| data_export.go | ||
| delivered_status.go | ||
| feature_flag.go | ||
| federated_identity.go | ||
| gear.go | ||
| gear_document.go | ||
| gear_image.go | ||
| gear_repair.go | ||
| genre.go | ||
| hardware.go | ||
| hls_stream.go | ||
| hls_stream_test.go | ||
| hls_transcode_queue.go | ||
| hls_transcode_queue_test.go | ||
| live_stream.go | ||
| message.go | ||
| message_reaction.go | ||
| mfa_config.go | ||
| notification.go | ||
| playback_analytics.go | ||
| playback_analytics_test.go | ||
| playlist.go | ||
| playlist_collaborator.go | ||
| playlist_collaborator_test.go | ||
| playlist_follow.go | ||
| playlist_share_link.go | ||
| playlist_test.go | ||
| playlist_version.go | ||
| queue.go | ||
| queue_session.go | ||
| read_receipt.go | ||
| recovery_code.go | ||
| refresh_token.go | ||
| report.go | ||
| requests.go | ||
| responses.go | ||
| role.go | ||
| role_test.go | ||
| room.go | ||
| room_invitation.go | ||
| royalty.go | ||
| seller_stripe_account.go | ||
| session.go | ||
| storage_quota.go | ||
| tag.go | ||
| track.go | ||
| track_comment.go | ||
| track_comment_test.go | ||
| track_history.go | ||
| track_history_test.go | ||
| track_like.go | ||
| track_like_test.go | ||
| track_lyrics.go | ||
| track_play.go | ||
| track_play_test.go | ||
| track_repost.go | ||
| track_share.go | ||
| track_share_test.go | ||
| track_status.go | ||
| track_stem.go | ||
| track_version.go | ||
| track_version_test.go | ||
| user.go | ||
| user_file.go | ||
| user_folder.go | ||
| user_genre_tag_follow.go | ||
| user_presence.go | ||
| user_settings.go | ||
| webauthn_credential.go | ||
| webhook.go | ||