Skip to content
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

Merged
merged 2 commits into from
May 27, 2022
Merged

Propagate context in migrations #596

merged 2 commits into from
May 27, 2022

Conversation

nbarbey
Copy link
Contributor

@nbarbey nbarbey commented May 9, 2022

This is to allow timeouts in migration operations.

This is related to issue #595 and issue #347.

@nbarbey nbarbey requested a review from a team May 9, 2022 15:34
@github-actions github-actions bot added area/CLI Affects the command line area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels May 9, 2022
@nbarbey nbarbey requested a review from vroldanbet as a code owner May 9, 2022 15:58
@@ -30,7 +31,7 @@ type Driver interface {
Version() (string, error)
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done !

@nbarbey nbarbey force-pushed the main branch 2 times, most recently from 73b3cea to 8c2bcc4 Compare May 13, 2022 15:52
@nbarbey nbarbey requested a review from josephschorr May 16, 2022 15:56
@josephschorr
Copy link
Member

@nbarbey Please rebase on main

@josephschorr
Copy link
Member

@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)
Copy link
Member

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

Copy link
Contributor Author

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 ...

nbarbey added 2 commits May 27, 2022 09:30
This is to allow timeouts in migration operations.
Copy link
Member

@josephschorr josephschorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josephschorr josephschorr merged commit fbcd2a3 into authzed:main May 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants