warrant-dev / warrant

Warrant is a highly scalable, centralized authorization service based on Google Zanzibar. Use it to define, enforce, query, and audit application authorization and access control.
https://warrant.dev
Apache License 2.0
1.12k stars 39 forks source link

Auto-migrate should only run migrations included in the current version #294

Open kkajla12 opened 7 months ago

kkajla12 commented 7 months ago

Describe the bug Currently, if using an older version of warrant, the auto-migrate will attempt to apply migrations from main which includes migrations that are not part of the running version.

To Reproduce Steps to reproduce the behavior:

  1. Run an old version of warrant (e.g. v1.0.1)
  2. Upon startup, auto-migrate will run all migrations on main and cause the service to crash.

Expected behavior The auto-migrate feature should fetch migrations from the relevant release/version rather than using the migrations on main.

Additional context N/A