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

refactor: move migrations to gobuffalo/fizz #1775

Merged
merged 60 commits into from Apr 30, 2020
Merged

refactor: move migrations to gobuffalo/fizz #1775

merged 60 commits into from Apr 30, 2020

Conversation

aeneasr
Copy link
Member

@aeneasr aeneasr commented Apr 2, 2020

Related issue

Proposed changes

Checklist

  • I have read the contributing guidelines
  • I have read the security policy
  • I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security
    vulnerability, I confirm that I got green light (please contact security@ory.sh) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation within the code base (if appropriate)
  • I have documented my changes in the developer guide (if appropriate)

Further comments

@aeneasr aeneasr added feat New feature or request. debt labels Apr 2, 2020
@aeneasr aeneasr added this to the v1.5.0 milestone Apr 2, 2020
@aeneasr aeneasr added this to In progress in Maintainer's Board via automation Apr 2, 2020
aeneasr and others added 6 commits April 2, 2020 15:07
# Conflicts:
#	docs/api.swagger.json
#	go.sum
#	internal/httpclient/models/accept_login_request.go
#	internal/httpclient/models/consent_request.go
#	internal/httpclient/models/consent_request_session.go
#	internal/httpclient/models/flush_inactive_o_auth2_tokens_request.go
#	internal/httpclient/models/json_web_key_set.go
#	internal/httpclient/models/json_web_key_set_generator_request.go
#	internal/httpclient/models/o_auth2_token_introspection.go
@zepatrik
Copy link
Member

zepatrik commented Apr 5, 2020

@aeneasr hey this is kinda working now
It currently is in a state where both the old and new migration systems are working so it is easier to test it. You can basically run hydra migrate sql and hydra migrate sqlold. You can also run make dumpdbs to create a (postgres) db dump after applying both the old and new migrations to a fresh database so you can diff them.
What is your recommended way of testing this automatically? We said something like running the quickstart for different versions of hydra and then migrating up but how would we then check whether it worked?
Also I didn't address cockroach migrations yet because they don't use the shared migrations. I think we can add empty files for not existing migrations there and for the next migrations to come use probably the fizz language anyway or trying to use shared sql for cockroach aswell.

@aeneasr
Copy link
Member Author

aeneasr commented Apr 6, 2020

Good job! Let's discuss this on slack/in a hangout. Ping me when you're online :)

@aeneasr
Copy link
Member Author

aeneasr commented Apr 6, 2020

To do:

  • Please dump databases for MySQL and CRDB as well and make a diff to ensure that they are the same
  • CockroachDB support
  • Rewrite migration tests (put them in persistence as a PoC and later merge them into fizz
  • Move all old migrations to internal/fizzmigrate as well as all code depending on sql-migrate and write tests that run old migrations step by step and then the new migrations afterwards and compare the outputs (the generated sql should be the same always):
    • Run {1,...,n} old migration and {1,...,n} new migration (in parallel) and compare their outputs (should be the same)
    • Run {1,...,n} old migration and {m-n,...,m} new migrations (in parallel) and compare their outputs (should be the same)

zepatrik and others added 14 commits April 7, 2020 12:14
# Conflicts:
#	.schema/api.swagger.json
#	consent/sql_migration_files.go
#	internal/httpclient/models/completed_request.go
#	internal/httpclient/models/generic_error.go
#	internal/httpclient/models/health_not_ready_status.go
#	internal/httpclient/models/json_web_key_set.go
#	internal/httpclient/models/json_web_key_set_generator_request.go
#	internal/httpclient/models/login_request.go
#	internal/httpclient/models/o_auth2_token_introspection.go
#	internal/httpclient/models/previous_consent_session.go
#	internal/httpclient/models/reject_request.go
#	internal/httpclient/models/userinfo_response.go
#	internal/httpclient/models/well_known.go
#	oauth2/sql_migration_files.go
log.Fatalf("Could not connect to database: %v", err)
}

func getManager(t *testing.T, url string) Manager {
Copy link
Member Author

Choose a reason for hiding this comment

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

Move this to the internal package

oauth2/fosite_store_test.go Show resolved Hide resolved
@@ -84,21 +84,9 @@ func TestManagers(t *testing.T) {
regs["memory"] = internal.NewRegistry(conf)

if !testing.Short() {
var p, m, c *sqlx.DB
dockertest.Parallel([]func(){
Copy link
Member Author

Choose a reason for hiding this comment

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

Revert this

client/manager_test.go Show resolved Hide resolved
table.Append([]string{m.db.DriverName(), names[component], plan.Id + ".sql", fmt.Sprintf("%d", k), up})
}
}
if err := c.Open(); err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

This must be retried, see connection.GetDatabaseRetry(time.Second*5, time.Minute*5)!

}

if err := tx.RawQuery(string(data)).Exec(); err != nil {
log.Print(mf.Version)
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
log.Print(mf.Version)
t.Logf(mf.Version)

return
}

for db, connect := range map[string]func(*testing.T) *pop.Connection{
Copy link
Member Author

Choose a reason for hiding this comment

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

Start these in parallel using dockertest.Parallel

})
}

// TODO this is very stupid and should be replaced as soon the manager uses pop
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
// TODO this is very stupid and should be replaced as soon the manager uses pop
// TODO https://github.com/ory/hydra/issues/1815
// this is very stupid and should be replaced as soon the manager uses pop

@@ -0,0 +1 @@
INSERT INTO hydra_client (id, client_name, client_secret, redirect_uris, grant_types, response_types, scope, owner, policy_uri, tos_uri, client_uri, logo_uri, contacts, public) VALUES ('client-0001', 'Client 0001', 'secret-0001', 'http://redirect/0001_1', 'grant-0001_1', 'response-0001_1', 'scope-0001', 'owner-0001', 'http://policy/0001', 'http://tos/0001', 'http://client/0001', 'http://logo/0001', 'contact-0001_1', true);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to self: figure out how to review this


// this type is copied from sql-migrate to remove the dependency
type OldMigrationRecord struct {
Id string `db:"id"`
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
Id string `db:"id"`
ID string `db:"id"`

@aeneasr
Copy link
Member Author

aeneasr commented Apr 22, 2020

The demo fails with:

hydra-migrate_1  | The following migration is planned:
hydra-migrate_1  | 
postgresd_1      | FATAL:  unrecognized configuration parameter "max_idle_conns"
postgresd_1      | FATAL:  unrecognized configuration parameter "max_conns"
hydra-migrate_1  | Could not get the migration status:
hydra-migrate_1  | pq: unrecognized configuration parameter "max_conns"
hydra-migrate_1  | could not create new transaction
hydra-migrate_1  | github.com/gobuffalo/pop/v5.newTX
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/tx.go:28
hydra-migrate_1  | github.com/gobuffalo/pop/v5.(*dB).Transaction
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/db.go:18
hydra-migrate_1  | github.com/gobuffalo/pop/v5.(*Connection).NewTransaction
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/connection.go:169
hydra-migrate_1  | github.com/gobuffalo/pop/v5.(*Connection).Transaction.func1
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/connection.go:136
hydra-migrate_1  | github.com/gobuffalo/pop/v5.commonDialect.Lock
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/dialect_common.go:30
hydra-migrate_1  | github.com/gobuffalo/pop/v5.(*Connection).Transaction
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/connection.go:134
hydra-migrate_1  | github.com/gobuffalo/pop/v5.CreateSchemaMigrations
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/migrator.go:197
hydra-migrate_1  | github.com/gobuffalo/pop/v5.Migrator.CreateSchemaMigrations
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/migrator.go:214
hydra-migrate_1  | github.com/gobuffalo/pop/v5.Migrator.Status
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/migrator.go:219
hydra-migrate_1  | github.com/ory/hydra/persistence/sql.(*Persister).MigrationStatus
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/persistence/sql/persister.go:40
hydra-migrate_1  | github.com/ory/hydra/cmd/cli.(*MigrateHandler).MigrateSQL
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/cmd/cli/handler_migrate.go:76
hydra-migrate_1  | github.com/spf13/cobra.(*Command).execute
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:842
hydra-migrate_1  | github.com/spf13/cobra.(*Command).ExecuteC
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:943
hydra-migrate_1  | github.com/spf13/cobra.(*Command).Execute
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:883
hydra-migrate_1  | github.com/ory/hydra/cmd.Execute
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/cmd/root.go:62
hydra-migrate_1  | main.main
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/main.go:33
hydra-migrate_1  | runtime.main
hydra-migrate_1  |      /usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/proc.go:203
hydra-migrate_1  | runtime.goexit
hydra-migrate_1  |      /usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/asm_amd64.s:1373
hydra-migrate_1  | couldn't start a new transaction
hydra-migrate_1  | github.com/gobuffalo/pop/v5.(*Connection).NewTransaction
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/connection.go:171
hydra-migrate_1  | github.com/gobuffalo/pop/v5.(*Connection).Transaction.func1
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/connection.go:136
hydra-migrate_1  | github.com/gobuffalo/pop/v5.commonDialect.Lock
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/dialect_common.go:30
hydra-migrate_1  | github.com/gobuffalo/pop/v5.(*Connection).Transaction
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/connection.go:134
hydra-migrate_1  | github.com/gobuffalo/pop/v5.CreateSchemaMigrations
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/migrator.go:197
hydra-migrate_1  | github.com/gobuffalo/pop/v5.Migrator.CreateSchemaMigrations
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/migrator.go:214
hydra-migrate_1  | github.com/gobuffalo/pop/v5.Migrator.Status
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/zepatrik/pop/v5@v5.0.12-0.20200418094557-850d559d8122/migrator.go:219
hydra-migrate_1  | github.com/ory/hydra/persistence/sql.(*Persister).MigrationStatus
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/persistence/sql/persister.go:40
hydra-migrate_1  | github.com/ory/hydra/cmd/cli.(*MigrateHandler).MigrateSQL
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/cmd/cli/handler_migrate.go:76
hydra-migrate_1  | github.com/spf13/cobra.(*Command).execute
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:842
hydra-migrate_1  | github.com/spf13/cobra.(*Command).ExecuteC
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:943
hydra-migrate_1  | github.com/spf13/cobra.(*Command).Execute
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:883
hydra-migrate_1  | github.com/ory/hydra/cmd.Execute
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/cmd/root.go:62
hydra-migrate_1  | main.main
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/main.go:33
hydra-migrate_1  | runtime.main
hydra-migrate_1  |      /usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/proc.go:203
hydra-migrate_1  | runtime.goexit
hydra-migrate_1  |      /usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/asm_amd64.s:1373
hydra-migrate_1  | github.com/ory/hydra/persistence/sql.(*Persister).MigrationStatus
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/persistence/sql/persister.go:40
hydra-migrate_1  | github.com/ory/hydra/cmd/cli.(*MigrateHandler).MigrateSQL
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/cmd/cli/handler_migrate.go:76
hydra-migrate_1  | github.com/spf13/cobra.(*Command).execute
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:842
hydra-migrate_1  | github.com/spf13/cobra.(*Command).ExecuteC
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:943
hydra-migrate_1  | github.com/spf13/cobra.(*Command).Execute
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:883
hydra-migrate_1  | github.com/ory/hydra/cmd.Execute
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/cmd/root.go:62
hydra-migrate_1  | main.main
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/main.go:33
hydra-migrate_1  | runtime.main
hydra-migrate_1  |      /usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/proc.go:203
hydra-migrate_1  | runtime.goexit
hydra-migrate_1  |      /usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/asm_amd64.s:1373
hydra-migrate_1  | github.com/ory/hydra/cmd/cli.(*MigrateHandler).MigrateSQL
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/cmd/cli/handler_migrate.go:77
hydra-migrate_1  | github.com/spf13/cobra.(*Command).execute
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:842
hydra-migrate_1  | github.com/spf13/cobra.(*Command).ExecuteC
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:943
hydra-migrate_1  | github.com/spf13/cobra.(*Command).Execute
hydra-migrate_1  |      /Users/foobar/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:883
hydra-migrate_1  | github.com/ory/hydra/cmd.Execute
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/cmd/root.go:62
hydra-migrate_1  | main.main
hydra-migrate_1  |      /Users/foobar/go/src/github.com/ory/hydra/main.go:33
hydra-migrate_1  | runtime.main
hydra-migrate_1  |      /usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/proc.go:203
hydra-migrate_1  | runtime.goexit
hydra-migrate_1  |      /usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/asm_amd64.s:1373

To run the demo, do:

$ make docker
$ docker tag oryd/hydra:latest oryd/hydra:v1.4.5
$ docker tag oryd/hydra:latest oryd/hydra:v1.4.6
$ docker-compose -f quickstart.yml \
    -f quickstart-postgres.yml \
    -f quickstart-tracing.yml \
    up --build

aeneasr and others added 18 commits April 22, 2020 12:19
# Conflicts:
#	internal/httpclient/models/accept_consent_request.go
#	internal/httpclient/models/consent_request_session.go
#	internal/httpclient/models/flush_inactive_o_auth2_tokens_request.go
#	internal/httpclient/models/health_status.go
#	internal/httpclient/models/json_web_key.go
#	internal/httpclient/models/json_web_key_set.go
#	internal/httpclient/models/logout_request.go
#	internal/httpclient/models/o_auth2_token_introspection.go
#	internal/httpclient/models/open_id_connect_context.go
#	internal/httpclient/models/previous_consent_session.go
#	internal/httpclient/models/reject_request.go
#	internal/httpclient/models/userinfo_response.go
# Conflicts:
#	internal/httpclient/models/consent_request.go
#	internal/httpclient/models/flush_inactive_o_auth2_tokens_request.go
#	internal/httpclient/models/generic_error.go
#	internal/httpclient/models/health_not_ready_status.go
#	internal/httpclient/models/health_status.go
#	internal/httpclient/models/json_web_key_set.go
#	internal/httpclient/models/json_web_key_set_generator_request.go
#	internal/httpclient/models/logout_request.go
#	internal/httpclient/models/o_auth2_client.go
#	internal/httpclient/models/previous_consent_session.go
#	internal/httpclient/models/userinfo_response.go
# Conflicts:
#	client/sql_migration_files.go
#	consent/sql_migration_files.go
#	go.sum
#	internal/httpclient/models/completed_request.go
#	internal/httpclient/models/health_not_ready_status.go
#	internal/httpclient/models/json_web_key_set_generator_request.go
#	internal/httpclient/models/login_request.go
#	internal/httpclient/models/o_auth2_client.go
#	internal/httpclient/models/oauth2_token_response.go
#	internal/httpclient/models/open_id_connect_context.go
#	internal/httpclient/models/previous_consent_session.go
#	internal/httpclient/models/userinfo_response.go
#	jwk/sql_migration_files.go
#	oauth2/sql_migration_files.go
@zepatrik
Copy link
Member

@aeneasr quickstart is now working for me and all tests pass, ready for review

@@ -27,14 +32,13 @@ test-resetdb:
docker rm -f hydra_test_database_mysql || true
docker rm -f hydra_test_database_postgres || true
docker rm -f hydra_test_database_cockroach || true
docker run --rm --name hydra_test_database_mysql -p 3444:3306 -e MYSQL_ROOT_PASSWORD=secret -d mysql:5.7
Copy link
Member Author

Choose a reason for hiding this comment

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

Why remove --rm?

Copy link
Member

Choose a reason for hiding this comment

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

mistake I think

Comment on lines 163 to 175
wg.Add(3)
go func() {
CleanAndMigrate(pg)(t)
wg.Done()
}()
go func() {
CleanAndMigrate(mysql)(t)
wg.Done()
}()
go func() {
CleanAndMigrate(crdb)(t)
wg.Done()
}()
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
wg.Add(3)
go func() {
CleanAndMigrate(pg)(t)
wg.Done()
}()
go func() {
CleanAndMigrate(mysql)(t)
wg.Done()
}()
go func() {
CleanAndMigrate(crdb)(t)
wg.Done()
}()
dbs := []*driver.RegistrySQL{pg, mysql, crdb}
wg.Add(len(dbs))
for _, db := range dbs {
go func(db *driver.RegistrySQL) {
defer wg.Wait()
CleanAndMigrate(db)(t)
}(db)
}
wg.Wait()

Comment on lines 163 to 175
wg.Add(3)
go func() {
CleanAndMigrate(pg)(t)
wg.Done()
}()
go func() {
CleanAndMigrate(mysql)(t)
wg.Done()
}()
go func() {
CleanAndMigrate(crdb)(t)
wg.Done()
}()
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
wg.Add(3)
go func() {
CleanAndMigrate(pg)(t)
wg.Done()
}()
go func() {
CleanAndMigrate(mysql)(t)
wg.Done()
}()
go func() {
CleanAndMigrate(crdb)(t)
wg.Done()
}()
dbs := []*driver.RegistrySQL{pg, mysql, crdb}
wg.Add(len(dbs))
for _, db := range dbs {
go func(db *driver.RegistrySQL) {
defer wg.Wait()
CleanAndMigrate(db)(t)
}(db)
}

.PHONY: test-legacy-migrations
test-legacy-migrations:
make test-resetdb
source scripts/test-env.sh && go test -tags legacy_migration_test -failfast -timeout=20m ./internal/fizzmigrate
Copy link
Member Author

Choose a reason for hiding this comment

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

isn't make sqlbin missing here?

Copy link
Member

Choose a reason for hiding this comment

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

hm right I thought we don't need it as the old migrations should not change but if they change we should make sqlbin here

@@ -56,6 +60,7 @@ func MustNewRegistry(c configuration.Provider) Registry {
}

func NewRegistry(c configuration.Provider) (Registry, error) {
fmt.Printf("got dsn '%s'\n", c.DSN())
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fmt.Printf("got dsn '%s'\n", c.DSN())

@@ -1,9 +1,12 @@
package driver

import (
"fmt"
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
"fmt"

go.mod Outdated
@@ -59,3 +60,5 @@ require (
golang.org/x/tools v0.0.0-20200313205530-4303120df7d8
gopkg.in/square/go-jose.v2 v2.5.0
)

replace github.com/gobuffalo/pop/v5 => github.com/zepatrik/pop/v5 v5.0.12-0.20200418094557-850d559d8122
Copy link
Member Author

Choose a reason for hiding this comment

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

This is still to do @zepatrik

@@ -78,6 +84,101 @@ func NewRegistrySQL(c *configuration.ViperProvider, db *sqlx.DB) *driver.Registr
return r.(*driver.RegistrySQL)
}

func NewRegistryPop(t *testing.T, url string) *driver.RegistrySQL {
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
func NewRegistryPop(t *testing.T, url string) *driver.RegistrySQL {
func NewRegistrySQL(t *testing.T, url string) *driver.RegistrySQL {

return db
var registries = make(map[string]driver.Registry)
var cleanRegistries = func(*testing.T) {
fmt.Printf("\n\nsetting memory reg\n\n\n")
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fmt.Printf("\n\nsetting memory reg\n\n\n")

zepatrik and others added 3 commits April 27, 2020 15:33
# Conflicts:
#	.schema/api.swagger.json
#	internal/httpclient/models/generic_error.go
#	internal/httpclient/models/json_web_key_set.go
#	internal/httpclient/models/json_web_key_set_generator_request.go
#	internal/httpclient/models/login_request.go
#	internal/httpclient/models/logout_request.go
#	internal/httpclient/models/o_auth2_token_introspection.go
#	internal/httpclient/models/previous_consent_session.go
#	internal/httpclient/models/reject_request.go
#	internal/httpclient/models/userinfo_response.go
#	internal/httpclient/models/well_known.go
@aeneasr aeneasr merged commit 94057d9 into master Apr 30, 2020
Maintainer's Board automation moved this from In progress to Done Apr 30, 2020
@aeneasr aeneasr deleted the fizzmigrate branch April 30, 2020 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants