这是indexloc提供的服务,不要输入任何密码
Skip to content

Applying migration fails on another instance of the GraphQL engine #2872

@RichieMerchant

Description

@RichieMerchant

Graphql Engine: v1.0.0-beta.6
Hasura Cli: v1.0.0-beta.6

Hi,

While trying to apply a migration from my staging db to my live, I get the following.

Applying migrations...◐ panic: runtime error: index out of range

goroutine 1 [running]:
github.com/hasura/graphql-engine/cli/migrate/database/hasuradb.(*HasuraDB).GetSetting(0xc4201cea10, 0x182ce32, 0xe, 0xc420572000, 0x0, 0x0, 0x49)
	/go/src/github.com/hasura/graphql-engine/cli/migrate/database/hasuradb/settings.go:172 +0x74f
github.com/hasura/graphql-engine/cli/migrate.(*Migrate).Migrate(0xc420572000, 0x16d1c7c8f08, 0x1824525, 0x2, 0x0, 0x0)
	/go/src/github.com/hasura/graphql-engine/cli/migrate/migrate.go:345 +0x4d
github.com/hasura/graphql-engine/cli/migrate/cmd.GotoCmd(0xc420572000, 0x16d1c7c8f08, 0x1824525, 0x2, 0x0, 0x0)
	/go/src/github.com/hasura/graphql-engine/cli/migrate/cmd/commands.go:209 +0x49
github.com/hasura/graphql-engine/cli/commands.ExecuteMigration(0x1828808, 0x7, 0xc420572000, 0x16d1c7c8f08, 0x32, 0xc42022e910)
	/go/src/github.com/hasura/graphql-engine/cli/commands/migrate.go:64 +0xab
github.com/hasura/graphql-engine/cli/commands.(*migrateApplyOptions).run(0xc42022e8c0, 0x18320b5, 0x16)
	/go/src/github.com/hasura/graphql-engine/cli/commands/migrate_apply.go:80 +0x16d
github.com/hasura/graphql-engine/cli/commands.newMigrateApplyCmd.func2(0xc42022bb80, 0xc42022eaf0, 0x0, 0x5, 0x0, 0x0)
	/go/src/github.com/hasura/graphql-engine/cli/commands/migrate_apply.go:29 +0x59
github.com/hasura/graphql-engine/cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc42022bb80, 0xc42022eaa0, 0x5, 0x5, 0xc42022bb80, 0xc42022eaa0)
	/go/src/github.com/hasura/graphql-engine/cli/vendor/github.com/spf13/cobra/command.go:762 +0x468
github.com/hasura/graphql-engine/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1c3dfa0, 0x18, 0x1831070, 0x14)
	/go/src/github.com/hasura/graphql-engine/cli/vendor/github.com/spf13/cobra/command.go:852 +0x30a
github.com/hasura/graphql-engine/cli/vendor/github.com/spf13/cobra.(*Command).Execute(0x1c3dfa0, 0x0, 0x0)
	/go/src/github.com/hasura/graphql-engine/cli/vendor/github.com/spf13/cobra/command.go:800 +0x2b
github.com/hasura/graphql-engine/cli/commands.Execute(0x0, 0x0)
	/go/src/github.com/hasura/graphql-engine/cli/commands/root.go:82 +0x54
main.main()
	/go/src/github.com/hasura/graphql-engine/cli/cmd/hasura/hasura.go:11 +0x22

I'm able to apply metadata ok but migration fails. I've tried applying a single version with the same result.

It would be nice to have better error messages that make sense.
I've tried adding --log-level DEBUG But this does not provide any further insight.

Thanks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions