Prepare refactor backend promotion to production with verified data preservation - #343
Merged
Merged
Conversation
Add GET /v1/event/{id}/registration/{hacker_id} so the admin panel can review a
participant's application data (CV, experience description, links) when deciding
acceptances. Organizer-only, read-only schema without the shirt-size validator so
stored data is always readable.
feat(hacker): visor de CV en PDF (GET /hacker/{id}/cv)
Sota càrrega alta, un handler intensiu en CPU pot bloquejar el heartbeat del worker async i el timeout per defecte de 30s el mata a mitja petició (vist als logs com a WORKER TIMEOUT i, al client, 'unexpected EOF'). S'apuja el timeout a 60s, s'afegeix graceful_timeout, keepalive i reciclatge de workers (max_requests) i es fan tots configurables per variables d'entorn (WEB_CONCURRENCY, GUNICORN_TIMEOUT, ...) per poder-ho ajustar a producció sense reconstruir la imatge.
- POST /event/{id}/tickets/send mails the QR ticket (event_hacker_ticket
template) to accepted and confirmed hackers in background, tracked with
hacker_event_registration.ticket_sent_at; GET /tickets/status for progress
- public GET /event/{id}/ticket/{code}/qr.png renders the QR embedded in the
mail (segno); GET /event/{id}/ticket/{hacker_id} exposes ticket state
- event_voucher table: bulk generate, list, summary, CSV export, QR per code
- PUT /event/{id}/vouchers/{voucher}/assign/{hacker} checks the hacker in
and binds the badge atomically; DELETE releases a lost badge
- hacker/user lookups by code also resolve an assigned voucher, so meals and
participation scans work with the badge
feat: tiquets de check-in per correu i vouchers físics per esdeveniment
perf: gunicorn — evitar WORKER TIMEOUT sota càrrega i fer-lo configurable
feat: GET /event/{id}/checkin-summary (comptadors en viu)
fix: exposa l'id dels hackers a HackerGet
EventSponsorUpdate.validate_tier només acceptava [0,1,2,3], però el tier 4
(Col·laboradors/patrocini inferior) és un tier vàlid al model d'empresa i al
frontend d'HackEPS. Amb la validació anterior, els sponsors de tier 4 no es
podien editar ni reordenar des del panell d'admin (PATCH /event/{id}/sponsors/
{company_id} retornava 422 'Unknown sponsor tier').
fix: permetre tier 4 (Col·laboradors) en editar sponsors
fix: validate participant uploads and correct account creation dates
bepes-code
marked this pull request as ready for review
September 23, 2026 15:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes the refactor backend to main with an explicit, data-preserving Docker release procedure. Merging validates code; the manual deployment workflow builds an immutable candidate without restarting production or running migrations.
Includes private backend/mail configuration preparation, transactional insertion of the missing ticket template, exact preservation checks for existing rows and sequences, and a cutover/recovery runbook. Resolves inherited Python lint/format failures with pinned Ruff, preserves legacy datetime behavior, and tests trusted proxy address handling. OpenAPI is identical before and after the quality cleanup.
Validated candidate:
0442cc91e3dd341089f7f062e7b1fac927b9cfdd, built on the VPS. All hosted checks pass: backend tests, quality, repository security and CodeQL. Locally, 118 tests pass. Fresh September 23 backups of both production databases were copied off-host, checksum-verified and restored into isolated PostgreSQL 15. The candidate migrations preserved all 5,349 existing rows across 28 tables and all 10 sequences. The final image passed isolated OpenAPI/CORS smoke checks and read all required production mail templates without sending email.Production preparation completed: healthy private Redis, immutable backend image and private configuration, pinned existing mail image with corrected email URLs, and ticket template 9 added after restore rehearsal while preserving all eight existing templates. Existing production backend image and schema remain unchanged; no merge or cutover has occurred.
Activation still requires the documented write freeze and fresh final backups, explicit migration with fingerprint comparison, application/mail restart, coordinated JWT/service-key rotation and signed-link reissuance, then backend verification before reopening writes. Frontend/Vercel work is explicitly outside scope at the owner's request. See
docs/production-release-2026-09-20.md. Keep draft until scheduling the production cutover.