-
Notifications
You must be signed in to change notification settings - Fork 286
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
Propagate context in migrations #596
Conversation
pkg/migrate/migrate.go
Outdated
@@ -30,7 +31,7 @@ type Driver interface { | |||
Version() (string, error) |
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.
Can you also add context to the Version()
call as well?
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.
Done !
73b3cea
to
8c2bcc4
Compare
@nbarbey Please rebase on main |
@nbarbey Mind rebasing one more time? |
@@ -109,9 +110,9 @@ func (mb *mysqlTester) NewDatabase(t testing.TB) string { | |||
func (mb *mysqlTester) runMigrate(t testing.TB, dsn string) { | |||
driver, err := migrations.NewMySQLDriverFromDSN(dsn, mb.options.Prefix) | |||
require.NoError(t, err, "failed to create migration driver: %s", err) | |||
err = migrations.Manager.Run(driver, migrate.Head, migrate.LiveRun) | |||
err = migrations.Manager.Run(context.Background(), driver, migrate.Head, migrate.LiveRun) |
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.
I think the duplication here might be in error
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.
Indeed, thanks ! This must have slipped through my attention while resolving the rebase conflicts ...
This is to allow timeouts in migration operations.
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.
LGTM
This is to allow timeouts in migration operations.
This is related to issue #595 and issue #347.