chore(release): v0.981 — Beta (staging deploy, bug bash, smoke test)
Some checks failed
Stream Server CI / test (push) Failing after 0s

This commit is contained in:
senke 2026-03-02 19:33:42 +01:00
parent d577f8c9be
commit 4464f98194
9 changed files with 381 additions and 8 deletions

2
.gitignore vendored
View file

@ -78,10 +78,12 @@ apps/web/dist_verification/
.env .env
.env.* .env.*
!.env.example !.env.example
!.env.staging.example
**/.env **/.env
**/.env.local **/.env.local
**/.env.* **/.env.*
!.env.example !.env.example
!.env.staging.example
veza-backend-api/.env veza-backend-api/.env
veza-chat-server/.env veza-chat-server/.env
veza-stream-server/.env veza-stream-server/.env

View file

@ -1,5 +1,22 @@
# Changelog - Veza # Changelog - Veza
## [v0.981] - 2026-03-02
### Added
- .env.staging.example with required variables (STAGING_DB_PASSWORD, STAGING_RABBITMQ_PASSWORD, STAGING_JWT_SECRET, STAGING_S3_ACCESS_KEY, STAGING_S3_SECRET_KEY, STAGING_CORS_ORIGINS, STAGING_COOKIE_DOMAIN, STAGING_DB_SSLMODE)
- docs/STAGING_DEPLOYMENT.md: step-by-step staging deployment guide
- docs/SMOKE_TEST_V0981.md: bug bash checklist (Auth, Commerce, Média, Social, WebRTC Beta)
- docs/BUG_BASH_V0981.md: template for tracking bugs (P1/P2/P3)
### Fixed
- docker-compose.staging.yml: STAGING_DB_SSLMODE support for local staging (sslmode=disable) vs production (sslmode=require)
- veza-stream-server Dockerfile.production: invalid COPY migrations syntax (2>/dev/null removed)
### Changed
- PROJECT_STATE: dernier tag v0.981, prochaine v0.982
---
## [v0.971] - 2026-03-02 ## [v0.971] - 2026-03-02
### Removed ### Removed

View file

@ -1 +1 @@
0.971 0.981

View file

@ -58,7 +58,7 @@ services:
- DB_USER=veza - DB_USER=veza
- DB_PASSWORD=${STAGING_DB_PASSWORD:?STAGING_DB_PASSWORD must be set} - DB_PASSWORD=${STAGING_DB_PASSWORD:?STAGING_DB_PASSWORD must be set}
- DB_NAME=veza_staging - DB_NAME=veza_staging
- DATABASE_URL=postgresql://veza:${STAGING_DB_PASSWORD:?STAGING_DB_PASSWORD must be set}@postgres:5432/veza_staging?sslmode=require - DATABASE_URL=postgresql://veza:${STAGING_DB_PASSWORD:?STAGING_DB_PASSWORD must be set}@postgres:5432/veza_staging?sslmode=${STAGING_DB_SSLMODE:-disable}
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
- RABBITMQ_URL=amqp://veza:${STAGING_RABBITMQ_PASSWORD:?STAGING_RABBITMQ_PASSWORD must be set}@rabbitmq:5672/%2f - RABBITMQ_URL=amqp://veza:${STAGING_RABBITMQ_PASSWORD:?STAGING_RABBITMQ_PASSWORD must be set}@rabbitmq:5672/%2f
- JWT_SECRET=${STAGING_JWT_SECRET} - JWT_SECRET=${STAGING_JWT_SECRET}
@ -106,7 +106,7 @@ services:
container_name: veza_stream_staging container_name: veza_stream_staging
restart: unless-stopped restart: unless-stopped
environment: environment:
- DATABASE_URL=postgresql://veza:${STAGING_DB_PASSWORD:?STAGING_DB_PASSWORD must be set}@postgres:5432/veza_staging?sslmode=require - DATABASE_URL=postgresql://veza:${STAGING_DB_PASSWORD:?STAGING_DB_PASSWORD must be set}@postgres:5432/veza_staging?sslmode=${STAGING_DB_SSLMODE:-disable}
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
- JWT_SECRET=${STAGING_JWT_SECRET:?STAGING_JWT_SECRET must be set} - JWT_SECRET=${STAGING_JWT_SECRET:?STAGING_JWT_SECRET must be set}
- PORT=3001 - PORT=3001

38
docs/BUG_BASH_V0981.md Normal file
View file

@ -0,0 +1,38 @@
# Bug Bash v0.981 — Suivi des bugs
**Date** : ___________
**Environnement** : Staging (voir [STAGING_DEPLOYMENT.md](STAGING_DEPLOYMENT.md))
**Checklist** : [SMOKE_TEST_V0981.md](SMOKE_TEST_V0981.md)
---
## Bugs P1 (bloquants)
| # | Flux | Description | Statut |
|---|------|-------------|--------|
| 1 | | | Open |
| 2 | | | Open |
---
## Bugs P2 (importants)
| # | Flux | Description | Statut |
|---|------|-------------|--------|
| 1 | | | Open |
| 2 | | | Open |
---
## Bugs P3 (mineurs)
| # | Flux | Description | Statut |
|---|------|-------------|--------|
| 1 | | | Open |
---
## Critères de release v0.981
- [ ] Aucun bug P1 ouvert
- [ ] Bugs P2 corrigés ou documentés avec justification

View file

@ -8,10 +8,10 @@
| Élément | Valeur | | Élément | Valeur |
|---------|--------| |---------|--------|
| **Dernier tag** | v0.971 | | **Dernier tag** | v0.981 |
| **Branche courante** | `main` | | **Branche courante** | `main` |
| **Phase** | Phase 9 — v1.0 Launch | | **Phase** | Phase 9 — v1.0 Launch |
| **Prochaine version** | v0.981 (Beta) | | **Prochaine version** | v0.982 (Polish) |
--- ---

172
docs/SMOKE_TEST_V0981.md Normal file
View file

@ -0,0 +1,172 @@
# Smoke Test v0.981 — Bug Bash Checklist
**Objectif** : Valider les 5 flux critiques du bug bash v0.981 Beta sur l'environnement staging.
---
## Prérequis
- [ ] Staging déployé selon [STAGING_DEPLOYMENT.md](STAGING_DEPLOYMENT.md)
- [ ] `GET /api/v1/health/deep` retourne 200 avec status healthy
- [ ] Frontend accessible (page de login affichée)
- [ ] Tokens JWT disponibles pour les tests authentifiés
---
## 1. Flux Auth
### 1.1 Register
- [ ] `POST /api/v1/auth/register` avec email, password, username → 201
- [ ] Email de vérification reçu (si configuré)
### 1.2 Login
- [ ] `POST /api/v1/auth/login` avec credentials valides → 200, tokens retournés
- [ ] Token JWT valide pour les requêtes protégées
### 1.3 2FA (setup / verify / disable)
- [ ] Setup 2FA : activer TOTP → QR code ou secret affiché
- [ ] Verify 2FA : `POST /api/v1/auth/login/2fa` avec code → 200
- [ ] Disable 2FA : désactiver (route appropriée) → succès
### 1.4 OAuth
- [ ] OAuth Google : initier flow → callback → compte lié
- [ ] OAuth GitHub : initier flow → callback → compte lié
### 1.5 Logout et sessions
- [ ] `POST /api/v1/auth/logout` → session révoquée
- [ ] Token refresh : `POST /api/v1/auth/refresh` → nouveau token
- [ ] Session list : lister sessions actives
- [ ] Session revoke : révoquer une session
### 1.6 Password reset
- [ ] Demander reset : email envoyé
- [ ] Compléter reset avec token → nouveau mot de passe actif
### 1.7 Account deletion
- [ ] `DELETE /api/v1/users/me` (ou équivalent) → compte supprimé
- [ ] Tentative de login avec email supprimé → 401
**Exemples curl** :
```bash
# Register
curl -s -X POST http://localhost:8080/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"SecurePass123!","username":"testuser"}' | jq .
# Login
curl -s -X POST http://localhost:8080/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"SecurePass123!"}' | jq .
```
---
## 2. Flux Commerce
### 2.1 Browse marketplace
- [ ] `GET /api/v1/marketplace/products` → liste paginée
- [ ] Recherche et filtres fonctionnent
### 2.2 Cart et checkout
- [ ] Add to cart : ajouter produit au panier
- [ ] Promo code : appliquer code promo → réduction affichée
- [ ] Checkout : initier paiement Hyperswitch (sandbox)
- [ ] Order confirmation : après paiement simulé → commande créée
### 2.3 Post-achat
- [ ] Download : télécharger le fichier acheté
- [ ] Review : laisser une évaluation
- [ ] Refund : demander remboursement (si applicable)
### 2.4 Seller
- [ ] Seller dashboard : voir ventes, statistiques
- [ ] Transfers : voir les virements versés
---
## 3. Flux Média
### 3.1 Upload et transcodage
- [ ] Upload track : upload fichier audio → track créé
- [ ] Transcode HLS : transcodage lancé → segments HLS disponibles
- [ ] Playback : lecture du track en streaming
### 3.2 Queue et playlists
- [ ] Queue : ajouter à la file, réordonner, supprimer
- [ ] Playlist create : créer une playlist
- [ ] Playlist share : partager un lien
- [ ] Playlist collab : collaborer (si applicable)
### 3.3 Recherche et analytics
- [ ] Search : recherche tracks, artists, albums
- [ ] Analytics : vues, écoutes (dashboard créateur)
### 3.4 Cloud storage
- [ ] Cloud upload : upload fichier vers cloud
- [ ] Version : gestion des versions
- [ ] Share : partage de fichier cloud
---
## 4. Flux Social
### 4.1 Feed
- [ ] Create post : créer une publication
- [ ] Like : liker un post
- [ ] Comment : commenter un post
### 4.2 Relations
- [ ] Follow : suivre un utilisateur
- [ ] Block : bloquer un utilisateur
### 4.3 Groupes
- [ ] Group create : créer un groupe
- [ ] Group join : rejoindre un groupe
- [ ] Group leave : quitter un groupe
### 4.4 Notifications
- [ ] Liste des notifications affichée
- [ ] Marquer comme lu
### 4.5 Chat
- [ ] Envoyer un message
- [ ] Réception en temps réel (WebSocket)
- [ ] Historique des conversations
---
## 5. WebRTC Beta
### 5.1 Badge et UX
- [ ] Badge "Beta" visible sur le bouton d'appel (CallButton)
- [ ] Tooltip "Fonctionne mieux sur le même réseau local" affiché
### 5.2 Appel audio en LAN
- [ ] Initier un appel audio entre deux clients sur le même réseau
- [ ] Signalisation (Offer/Answer/ICE) fonctionne
- [ ] Audio bidirectionnel établi (ou message d'échec attendu si NAT)
---
## 6. Vérifications techniques
### 6.1 Health
```bash
curl -s http://localhost:8080/api/v1/health | jq .
curl -s http://localhost:8080/api/v1/health/deep | jq .
```
### 6.2 Stream server
```bash
curl -s http://localhost:3001/health | jq .
```
### 6.3 Frontend
- [ ] Page login s'affiche sans erreur console
- [ ] Navigation vers dashboard après login
---
## Suivi des bugs
Documenter tout bug trouvé dans [BUG_BASH_V0981.md](BUG_BASH_V0981.md) avec : flux, description, sévérité (P1/P2/P3), statut.

144
docs/STAGING_DEPLOYMENT.md Normal file
View file

@ -0,0 +1,144 @@
# Déploiement Staging — v0.981
Procédure pas-à-pas pour déployer l'environnement staging Veza avec [docker-compose.staging.yml](../docker-compose.staging.yml) et [config/caddy/Caddyfile.staging](../config/caddy/Caddyfile.staging).
---
## Prérequis
- Docker et Docker Compose installés
- `.env` créé à partir de `.env.staging.example` avec les variables remplies
---
## 1. Configuration
### 1.1 Créer le fichier .env
```bash
cp .env.staging.example .env
# Éditer .env et remplir toutes les variables requises
```
Variables obligatoires :
- `STAGING_DB_PASSWORD`
- `STAGING_RABBITMQ_PASSWORD`
- `STAGING_JWT_SECRET`
- `STAGING_S3_ACCESS_KEY`
- `STAGING_S3_SECRET_KEY`
Variables optionnelles (valeurs par défaut) :
- `STAGING_CORS_ORIGINS` (défaut : `https://staging.veza.app,https://staging-api.veza.app`)
- `STAGING_COOKIE_DOMAIN` (défaut : `.staging.veza.app`)
### 1.2 Staging local (développement)
Pour un déploiement staging **local** (postgres dans docker sans SSL), configurer :
```
STAGING_DB_SSLMODE=disable
```
Si `sslmode=require` est utilisé et que postgres local n'a pas SSL, la connexion DB échouera avec une erreur du type "connection requires SSL". Voir [.env.staging.example](../.env.staging.example).
---
## 2. Build et démarrage
### 2.1 Valider la configuration
```bash
docker-compose -f docker-compose.staging.yml config
```
Attendu : validation OK, pas d'erreur de substitution de variables.
### 2.2 Builder et démarrer
```bash
docker-compose -f docker-compose.staging.yml build
docker-compose -f docker-compose.staging.yml up -d
```
### 2.3 Appliquer les migrations
Les migrations sont exécutées automatiquement au démarrage du backend. Si vous devez les lancer manuellement (par exemple après une mise à jour du schéma) :
```bash
# Depuis la racine du projet
export DATABASE_URL="postgresql://veza:${STAGING_DB_PASSWORD}@localhost:5432/veza_staging?sslmode=${STAGING_DB_SSLMODE:-disable}"
cd veza-backend-api && go run cmd/migrate_tool/main.go
```
Ou via le conteneur backend :
```bash
docker exec veza_backend_staging wget -qO- http://localhost:8080/api/v1/health
# Vérifier que le backend répond (migrations lancées au démarrage)
```
---
## 3. Vérification
### 3.1 Health checks
**Backend — health simple** :
```bash
curl -s http://localhost:8080/api/v1/health | jq .
# Attendu: { "status": "ok" }
```
**Backend — deep health** (DB, Redis, RabbitMQ, S3) :
```bash
curl -s http://localhost:8080/api/v1/health/deep | jq .
# Attendu: "status": "healthy" (ou "degraded" acceptable pour certains services)
```
**Via Caddy** (si accès par port 80/443) :
```bash
curl -s http://localhost/api/v1/health/deep | jq .
```
### 3.2 Stream server
```bash
curl -s http://localhost:3001/health | jq .
# Ou via Caddy: curl -s http://localhost/stream (WebSocket)
```
### 3.3 Frontend
- Navigateur : `http://localhost` (via Caddy) ou `http://localhost:5173` (port direct frontend)
- La page de login doit s'afficher
### 3.4 Services disponibles
| Service | Port direct | Via Caddy |
|---------------|-------------|-----------------|
| Caddy (proxy) | 80, 443 | - |
| Backend | 8080 | /api/* |
| Stream server | 3001 | /stream, /hls/* |
| Frontend | 5173 | /* |
| MinIO console | 9001 | - |
---
## 4. Arrêt et nettoyage
```bash
docker-compose -f docker-compose.staging.yml down
# Avec volumes : docker-compose -f docker-compose.staging.yml down -v
```
---
## Références
- [docker-compose.staging.yml](../docker-compose.staging.yml)
- [config/caddy/Caddyfile.staging](../config/caddy/Caddyfile.staging)
- [SMOKE_TEST_V0981.md](SMOKE_TEST_V0981.md) — checklist bug bash
- [BUG_BASH_V0981.md](BUG_BASH_V0981.md) — suivi des bugs

View file

@ -17,7 +17,7 @@ RUN cargo fetch --locked
# Copy source code # Copy source code
COPY src ./src COPY src ./src
COPY migrations ./migrations 2>/dev/null || true COPY migrations ./migrations
COPY build.rs ./ COPY build.rs ./
# Build the application with optimizations # Build the application with optimizations
@ -48,8 +48,8 @@ WORKDIR /app
# Copy binary from builder # Copy binary from builder
COPY --from=builder --chown=app:app /app/target/x86_64-unknown-linux-musl/release/stream_server /app/stream_server COPY --from=builder --chown=app:app /app/target/x86_64-unknown-linux-musl/release/stream_server /app/stream_server
# Copy migrations if they exist # Copy migrations from builder
COPY --from=builder --chown=app:app /app/migrations ./migrations 2>/dev/null || true COPY --from=builder --chown=app:app /app/migrations ./migrations
# Switch to app user # Switch to app user
USER app USER app