-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(storage/sql): embed migrations into flipt binary #1096
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, mostly just minor pedantic comments. Gonna pull down locally real quick to get a better look before 👍🏻 .
Also would you mind adding a section to the depcrecations file ? Also perhaps adding a section to the Changelog like:
## Unreleased
### Deprecated
- blah
Just so we don't forget before releasing?
In the future we could prob move to using release-please
to update the changelog for us based on conventional commits, but we may need to do some configuration there first to make it match the current syntax of our Changelog file.
This is great btw, will prevent issues in the future with migrations misconfigurations/incorrect paths! TY!! |
Codecov Report
@@ Coverage Diff @@
## main #1096 +/- ##
==========================================
- Coverage 80.80% 80.52% -0.29%
==========================================
Files 26 26
Lines 1870 1884 +14
==========================================
+ Hits 1511 1517 +6
- Misses 279 287 +8
Partials 80 80
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👨🏻🍳 💋
The core of this refactor is to move migrations into an
embed.FS
variable.This will embed all migrations into the Flipt binary; making it more portable.
The PR:
config/migrations
containing a single exported variableFS
withgo:embed
directive.file
, to use the new source driveriofs
.db.migrations.path
anddb.migrations_path
configuration options.config/migrations
from packaging, archiving and docker image building.storage/sql
to introduce a new re-usablestorage/sql/testing
package.