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

Panic when module schemas change #2802

Closed
wesbillman opened this issue Sep 24, 2024 · 0 comments · Fixed by #2824
Closed

Panic when module schemas change #2802

wesbillman opened this issue Sep 24, 2024 · 0 comments · Fixed by #2824
Assignees
Labels
bug Something isn't working P2

Comments

@wesbillman
Copy link
Collaborator

When running main with ftl dev --recreate after the modules are deployed, in a new terminal window run ftl schema get --watch. Then, make a change to echo.go to modify the module triggering a possible schema change (I changed "Hello, %s!!! It is %s!" to "Hellos, %s!!! It is %s!"). Save the file and the ftl schema get --watch will panic.

I think this is leading to other schema update errors elsewhere, but this was the easiest way I could find to reproduce.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x30 pc=0x102f0e238]

goroutine 1 [running]:
github.com/TBD54566975/ftl/backend/schema.ModuleFromProto(0x140003f3940?)
	/Users/wesbillman/dev/ftl/backend/schema/module.go:235 +0x18
main.(*getSchemaCmd).Run(0x10579da38, {0x10474f098, 0x14000a82210}, {0x104768390, 0x1400092fd00})
	/Users/wesbillman/dev/ftl/frontend/cli/cmd_schema_get.go:40 +0x1cc
reflect.Value.call({0x104424fc0?, 0x10579da38?, 0x14000671918?}, {0x103c68b1f, 0x4}, {0x14000a82420, 0x2, 0x1031b2028?})
	/Users/wesbillman/Library/Caches/hermit/pkg/go-1.23.1/src/reflect/value.go:581 +0x97c
reflect.Value.Call({0x104424fc0?, 0x10579da38?, 0x14000671a18?}, {0x14000a82420?, 0x10471e080?, 0x14000671950?})
	/Users/wesbillman/Library/Caches/hermit/pkg/go-1.23.1/src/reflect/value.go:365 +0x94
github.com/alecthomas/kong.callFunction({0x104424fc0?, 0x10579da38?, 0x14000671b78?}, 0x14000a82360)
	/Users/wesbillman/go/pkg/mod/github.com/alecthomas/[email protected]/callbacks.go:98 +0x390
github.com/alecthomas/kong.(*Context).RunNode(0x140009a6c80, 0x140004fc2d0, {0x14000671e80, 0x1, 0x1400092fc80?})
	/Users/wesbillman/go/pkg/mod/github.com/alecthomas/[email protected]/context.go:798 +0x604
github.com/alecthomas/kong.(*Context).Run(0x140001a2c30?, {0x14000671e80?, 0x1400052c208?, 0x3?})
	/Users/wesbillman/go/pkg/mod/github.com/alecthomas/[email protected]/context.go:823 +0x138
main.main()
	/Users/wesbillman/dev/ftl/frontend/cli/main.go:128 +0x45c
@wesbillman wesbillman added the bug Something isn't working label Sep 24, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Sep 24, 2024
@ftl-robot ftl-robot mentioned this issue Sep 24, 2024
@bradleydwyer bradleydwyer added P2 next Work that will be be picked up next and removed triage Issue needs triaging labels Sep 24, 2024
@stuartwdouglas stuartwdouglas self-assigned this Sep 25, 2024
@github-actions github-actions bot removed the next Work that will be be picked up next label Sep 25, 2024
stuartwdouglas added a commit that referenced this issue Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants