weaviate
weaviate copied to clipboard
Panic observed while creating a multiple vector collection using REST API
How to reproduce this bug?
- Start weaviate using docker compose . The docker compose file has
DEFAULT_VECTORIZER_MODULE: 'text2vec-openai'andENABLE_MODULES: 'text2vec-cohere,text2vec-huggingface,text2vec-palm,text2vec-openai,generative-openai,generative-cohere,generative-palm,ref2vec-centroid,reranker-cohere,qna-openai' - Create a class having the following payload
"class": "article",
"description": "A written text, for example a news article or blog post",
"vectorIndexConfig": { "dynamicEfFactor": 8 },
"invertedIndexConfig": {
"bm25": {
"b": 0.8,
"k1": 1.1
}
},
"moduleConfig": [{
"text2vec-contextionary": {
"vectorizeClassName": "false"
},
"text2vec-openai":{
"model": "text-embedding-3-large",
"dimensions": 3072,
"type": "text"
}
}],
"properties": [
{
"dataType": [
"text"
],
"description": "Title of the article",
"name": "title"
},
{
"dataType": [
"text"
],
"description": "The content of the article",
"name": "content"
},
{
"dataType": [
"text"
],
"description": "The category of the article",
"name": "category"
}
]
}
- Use REST API to send the above payload request to Weaviate.. POST method
http://localhost:8080/v1/schema
What is the expected behavior?
No Panics should be observed.
What is the actual behavior?
The following panic is observed..
2024-03-19 14:25:05 weaviate-weaviate-node-1-1 | {"action":"requests_total","api":"rest","class_name":"","error":"interface conversion: interface {} is []interface {}, not map[string]interface {}","level":"error","msg":"unexpected error","query_type":"","time":"2024-03-19T14:25:05Z"} {"error":"interface conversion: interface {} is []interface {}, not map[string]interface {}","level":"error","method":"POST","msg":"interface conversion: interface {} is []interface {}, not map[string]interface {}","path":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/v1/schema","RawPath":"","OmitHost":false,"ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""},"time":"2024-03-19T14:18:21Z"}
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | {"action":"requests_total","api":"rest","class_name":"","error":"interface conversion: interface {} is []interface {}, not map[string]interface {}","level":"error","msg":"unexpected error","query_type":"","time":"2024-03-19T14:18:21Z"}
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | goroutine 88643 [running]:
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | runtime/debug.Stack()
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x64
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | runtime/debug.PrintStack()
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/runtime/debug/stack.go:16 +0x1c
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.handlePanics({0x18d4548, 0x4003778880}, {0x18bcef0, 0x4002efc718}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/panics_middleware.go:80 +0x250
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | panic({0x11fccc0?, 0x4004b1ea80?})
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/runtime/panic.go:914 +0x218
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/usecases/modules.(*Provider).SetClassDefaults.func1(0x4004b1ea50)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/usecases/modules/module_config_init_and_validate.go:32 +0xe8
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/usecases/modules.(*Provider).setPerClassConfigDefaults(0x11ca900?, 0x4006844840, {0xffff6ee001d8?, 0x40038b3420?}, 0x40068448f0)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/usecases/modules/module_config_init_and_validate.go:87 +0x300
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/usecases/modules.(*Provider).setClassDefaults(0x4002239720, 0x4002620630, {0x400004607a, 0xf}, {0x0, 0x0}, 0x40025370e0?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/usecases/modules/module_config_init_and_validate.go:65 +0x148
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/usecases/modules.(*Provider).SetClassDefaults(0x4003450360?, 0x4000100000?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/usecases/modules/module_config_init_and_validate.go:28 +0xa0
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/usecases/schema.(*Manager).setClassDefaults(0x4003758000, 0x4002620630)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/usecases/schema/add.go:254 +0x390
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/usecases/schema.(*Manager).addClass(0x4003758000, {0x18bd938, 0x4004b1e870}, 0x4002620630)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/usecases/schema/add.go:145 +0x28c
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/usecases/schema.(*Manager).AddClass(0x4003758000, {0x18bd938, 0x4004b1e870}, 0xb9d5f4?, 0x40045153d0?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/usecases/schema/add.go:50 +0x70
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.(*schemaHandlers).addClass(0x40022289f0, {0x400220d000?, 0x4002620630?}, 0x0?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/handlers_schema.go:34 +0x64
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest/operations/schema.SchemaObjectsCreateHandlerFunc.Handle(0x40059e6de8?, {0x400220d000?, 0x4002620630?}, 0x18ad0c0?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/operations/schema/schema_objects_create.go:32 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest/operations/schema.(*SchemaObjectsCreate).ServeHTTP(0x40022290b0, {0x18b9820, 0x400019f0a0}, 0x400220d000)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/operations/schema/schema_objects_create.go:79 +0x234
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/go-openapi/runtime/middleware.(*Context).RoutesHandler.NewOperationExecutor.func1({0x18b9820, 0x400019f0a0}, 0x400220d000)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/pkg/mod/github.com/go-openapi/[email protected]/middleware/operation.go:28 +0x5c
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x4003450120?, {0x18b9820?, 0x400019f0a0?}, 0x24b7978?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.configureAPI.makeSetupMiddlewares.func7.1({0x18b9820, 0x400019f0a0}, 0x400220d000)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/middlewares.go:43 +0xf4
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x25750e0?, {0x18b9820?, 0x400019f0a0?}, 0x29280?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/go-openapi/runtime/middleware.NewRouter.func1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/pkg/mod/github.com/go-openapi/[email protected]/middleware/router.go:78 +0x1c4
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x4004515380?, {0x18b9820?, 0x400019f0a0?}, 0x1126720?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/go-openapi/runtime/middleware.Redoc.func1({0x18b9820, 0x400019f0a0}, 0x40059e7238?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/pkg/mod/github.com/go-openapi/[email protected]/middleware/redoc.go:72 +0x1f4
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x14913f0?, {0x18b9820?, 0x400019f0a0?}, 0x131ae80?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/go-openapi/runtime/middleware.Spec.func1({0x18b9820, 0x400019f0a0}, 0x40059e7258?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/pkg/mod/github.com/go-openapi/[email protected]/middleware/spec.go:46 +0x168
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x40024c5180?, {0x18b9820?, 0x400019f0a0?}, 0x400220ce00?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/rs/cors.(*Cors).Handler-fm.(*Cors).Handler.func1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/pkg/mod/github.com/rs/[email protected]/cors.go:200 +0x19c
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x4004515370?, {0x18b9820?, 0x400019f0a0?}, 0x4004b1e750?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest/swagger_middleware.AddMiddleware.func1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/swagger_middleware/swagger_middleware.go:37 +0x21c
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x400288e0e0?, {0x18b9820?, 0x400019f0a0?}, 0x3?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.makeAddLogging.func1.1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/middlewares.go:121 +0x210
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x133fae0?, {0x18b9820?, 0x400019f0a0?}, 0x1c?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.addPreflight.func1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/middlewares.go:156 +0x310
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x4003450120?, {0x18b9820?, 0x400019f0a0?}, 0x10?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.addLiveAndReadyness.func1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/middlewares.go:195 +0x108
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x4003450120?, {0x18b9820?, 0x400019f0a0?}, 0xffff6f0c4bd0?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.addHandleRoot.func1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/middlewares.go:58 +0x1cc
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x4003450120?, {0x18b9820?, 0x400019f0a0?}, 0x10102bc?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.makeAddModuleHandlers.func1.1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/middlewares.go:79 +0x8c
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x4005d939f8?, {0x18b9820?, 0x400019f0a0?}, 0x2538b40?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.addInjectHeadersIntoContext.func1({0x18b9820, 0x400019f0a0}, 0x400220ce00)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/middlewares.go:174 +0x1c0
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x4005d93ab8?, {0x18b9820?, 0x400019f0a0?}, 0x2f9a24?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | github.com/weaviate/weaviate/adapters/handlers/rest.makeCatchPanics.func1.1({0x18b9820?, 0x400019f0a0?}, 0x4004515330?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /go/src/github.com/weaviate/weaviate/adapters/handlers/rest/panics_middleware.go:29 +0x94
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.HandlerFunc.ServeHTTP(0x10?, {0x18b9820?, 0x400019f0a0?}, 0x400019f0a0?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2136 +0x38
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.serverHandler.ServeHTTP({0x18b4c60?}, {0x18b9820?, 0x400019f0a0?}, 0x6?)
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2938 +0xbc
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | net/http.(*conn).serve(0x4003450000, {0x18bd938, 0x4002dcc4b0})
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:2009 +0x518
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | created by net/http.(*Server).Serve in goroutine 133
2024-03-19 14:18:21 weaviate-weaviate-node-1-1 | /usr/local/go/src/net/http/server.go:3086 +0x4cc
Supporting information
Note: I couldn't find information on how to enable multiple vectors in a collection using REST API or curl. I was looking into this link https://weaviate.io/developers/weaviate/api/rest/schema and failed to find information.
Server Version
1.24.4
Code of Conduct
- [X] I have read and agree to the Weaviate's Contributor Guide and Code of Conduct
I think this was fixed in the PR mentioned above