encore
encore copied to clipboard
bug: cache cluster cannot be defined outside of service
When trying to specify an cache cluster outside of an serivce, this error occurrs. Simply moving the initialization to a service seems to solve this issue.
I don't know if this intended or not, but it does work to create PubSub topics outside of services, so there is at least some inconsistency. But please feel free to close this issue if this is intended.
➜ encore run
❌ Building Encore application graph... Failed: Unhandled Panic
⠐ Analyzing service topology...
── Unhandled Panic ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[E0001]──
A unhandled panic occurred: unsupported resource type CacheClusterResource
This is a bug in Encore and should not have occurred. Please report this issue to the Encore team either on Github at https://github.com/encoredev/encore/issues/new and include this error.
╭─[Stack Trace]
├─▶ parser.(*parser).Parse.func1 /Users/runner/work/encore/encore/encr.dev/parser/parser.go:120
├─▶ parser.(*parser).validateApp /Users/runner/work/encore/encore/encr.dev/parser/parser.go:578
├─▶ parser.(*parser).Parse /Users/runner/work/encore/encore/encr.dev/parser/parser.go:155
├─▶ parser.Parse /Users/runner/work/encore/encore/encr.dev/parser/parser.go:93
├─▶ run.(*Run).parseApp /Users/runner/work/encore/encore/encr.dev/cli/daemon/run/run.go:256
├─▶ run.(*Run).buildAndStart /Users/runner/work/encore/encore/encr.dev/cli/daemon/run/run.go:275
╰─[... remaining frames omitted ...]
Thanks @melkstam, this is a bug and not intended. Will fix.