Backend fails to start due to invalid Flyway migration syntax (SZ-84)
rk@tigase.net opened 5 days ago

Release: 1.8
Severity: Blocker
Component: sztab-backend / Flyway
Reported by: Wojciech Kapcia
Reproducible: Yes
Linked defect: sztabina build failure on Apple Silicon (Rel 1.8)


Environment

  • Docker Compose deployment
  • Clean database
  • Using published Rel 1.8 images

Observed Error

Migration V0__pre_freeze_placeholder.sql failed
SQL State  : 42601
Message    : ERROR: syntax error at or near "#"
Statement  : #

Root Cause

Migration file V0__pre_freeze_placeholder.sql uses # as a comment prefix, which is invalid SQL syntax in PostgreSQL.
Flyway executes the file verbatim and fails during application startup.


Expected Behavior

Placeholder migrations must contain valid PostgreSQL syntax or be removed if unnecessary.


Proposed Fix

Replace the contents with valid PostgreSQL comments:

-- Placeholder migration
-- Reserved for post-freeze changes

Alternatively, delete the migration file if no version marker is required.


Impact

  • Backend fails to start
  • ApplicationContext initialization fails
  • Blocks usage of Rel 1.8 even with prebuilt images

Notes

  • Deterministic and reproducible
  • Independent of host architecture
  • Release-blocking for Rel 1.8
  • rk@tigase.net changed fields 5 days ago
    Name Previous Value Current Value
    Priority
    Normal
    Blocker
  • rk@tigase.net commented 5 days ago

    Switched to branch 'wolnosc' Your branch is up to date with 'origin/wolnosc'. rksuma@Ramakrishnans-MacBook-Pro sztab % git pull origin wolnosc From https://tigase.dev/sztab

    • branch wolnosc -> FETCH_HEAD Already up to date. rksuma@Ramakrishnans-MacBook-Pro sztab % git checkout -b fix/rel-1.8-docker-arm64-flyway Switched to a new branch 'fix/rel-1.8-docker-arm64-flyway' rksuma@Ramakrishnans-MacBook-Pro sztab %
  • rk@tigase.net changed state to 'In Progress' 5 days ago
    Previous Value Current Value
    Open
    In Progress
  • rk@tigase.net commented 5 days ago

    Fix verification:

    rksuma@Ramakrishnans-MacBook-Pro sztab % docker compose -f deploy/docker/docker-compose.yml up sztab-backend
    [+] Running 4/4
     ✔ Container forgejo-init   Created                                                                                                             0.0s 
     ✔ Container sztab-db       Running                                                                                                             0.0s 
     ✔ Container forgejo        Running                                                                                                             0.0s 
     ✔ Container sztab-backend  Running                                                                                                             0.0s 
    Attaching to sztab-backend
    
    
    
  • rk@tigase.net commented 4 days ago

    Fixed in 1.8.1

  • rk@tigase.net changed state to 'Closed' 4 days ago
    Previous Value Current Value
    In Progress
    Closed
issue 1 of 1
Type
Bug
Priority
Blocker
Assignee
Version
1.8
Sprints
n/a
Customer
n/a
Issue Votes (0)
Watchers (3)
Reference
SZ-84
Please wait...
Page is in error, reload to recover